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
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.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 25 10:01:29 2024 UTC