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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 17:01:33 2024 UTC