|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8355 split() and explode() only accepts 2 parameters
Submitted: 2000-12-21 10:53 UTC Modified: 2000-12-21 19:56 UTC
From: webbox at hotmail dot com Assigned:
Status: Closed Package: *Regular Expressions
PHP Version: 4.0.0 OS: Linux (Debian 2.0.36)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: webbox at hotmail dot com
New email:
PHP Version: OS:


 [2000-12-21 10:53 UTC] webbox at hotmail dot com
The optional limit parameter produces the following error messages when given to the functios explode() and split():

Warning: Wrong parameter count for explode() in path/to/file.php on line xxx

Warning: unexpected regex error (13) in 
path/to/file.php on line xxx

The PHP code I executed was

list ($t1, $t2, $t3) = explode ($find, $string, 3);
list ($t1, $t2, $t3) = split ($find, $string, 3);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-21 14:44 UTC]
third parameter to explode() was added in 4.0.1 
third parameter to split() has been there from the start in php 4
 [2000-12-21 19:56 UTC]
I added a note about the third argument into explode() documentation.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 13:01:29 2024 UTC