php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #746 split doesn't seem to work any more - used to work fine with 3.0RC3
Submitted: 1998-09-14 10:43 UTC Modified: 1998-09-14 10:53 UTC
From: asengupt at cs dot indiana dot edu Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.3 OS: SunOS tiburon.cs.indiana.edu 5.6
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: asengupt at cs dot indiana dot edu
New email:
PHP Version: OS:

 

 [1998-09-14 10:43 UTC] asengupt at cs dot indiana dot edu
<?

$string = "hello:world:now";

$foobar = split(":", $string, 3);

echo "$foobar[0], $foobar[1], $foobar[2]<br>";

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-09-14 10:53 UTC] rasmus
This works fine for me.  You might have messed up your regex library when you last built PHP.  It is suggested you use the built-in regex library and not your system's library.  Also, for a single delimiter like that you should be using explode()
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC