php.net |  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);

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-21 14:44 UTC] hholzgra@php.net
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] sniper@php.net
I added a note about the third argument into explode() documentation.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC