|  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
 [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-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 06:05:53 2022 UTC