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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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);

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: Sat Dec 21 16:01:28 2024 UTC