|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9 error using split function
Submitted: 1998-01-26 18:29 UTC Modified: 2011-08-29 13:53 UTC
Avg. Score:3.4 ± 1.4
Reproduced:9 of 12 (75.0%)
Same Version:12 (133.3%)
Same OS:10 (111.1%)
From: gareth at omnipotent dot net Assigned:
Status: Closed Package: *General Issues
PHP Version: 3.0 Latest CVS OS: Linux 2.0.33 / Intel P2/233
Private report: No CVE-ID: None
 [1998-01-26 18:29 UTC] gareth at omnipotent dot net
The following scriptet:

Warning: bad regular expression for split() in /www/splittest.php on line 2

and naturally doesn't assign anything to the $myarr array.

I suppose really you'd expect either to assign an empty value
to the first item in the array, or else to skip the leading
deliminator altogether...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-01-28 01:11 UTC] rasmus
Small side-note: For a simple split like this, using
explode() ( ) is faster.

The bug in split() has been fixed now.  Patch is available at:

Or wait for the the b4 release.
 [2011-08-29 13:53 UTC]
-Package: Other +Package: *General Issues -Assigned To: +Assigned To: bjori
 [2013-07-18 07:55 UTC] adasdfdsd at ahoo dot com
 [2013-12-31 18:53 UTC]
Automatic comment on behalf of bukka
Log: Fix #9: fann_train not working
 [2016-02-26 16:57 UTC]
Automatic comment on behalf of
Log: Fix #9 clear first bit only
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 26 11:01:32 2024 UTC