php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1570 split() truncates last element
Submitted: 1999-06-19 11:21 UTC Modified: 2000-03-06 11:09 UTC
From: richard at hacom dot nl Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.9 OS: Solaris 2.5.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: richard at hacom dot nl
New email:
PHP Version: OS:

 

 [1999-06-19 11:21 UTC] richard at hacom dot nl
<?
  $s = split(":", "a:b:c", 2);
  print($s[1]);
?>

output with PHP 3.0.8:   b:c
output with PHP 3.0.9:   b

According to the docu (and the code comments) the 3.0.8 behaviour is correct, and I've used
it frequently in my code, so 3.0.9 breaks some of my programs. I'm sure others will be bitten
by this too.

Richard.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-21 18:14 UTC] andrey at cvs dot php dot net
Fixed in CVS.
 [2000-03-06 11:09 UTC] hholzgra at cvs dot php dot net
as it is fixed, it should be closed
 [2013-12-04 12:06 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=332260
Log: fix #66195 restore error handler is not ignored (zend_builtin_functions.c#1570)
 [2020-02-07 06:08 UTC] phpdocbot@php.net
Automatic comment on behalf of krakjoe
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=13bf1bc8f52ce8b4e26a2887313bcb3f1e00d36d
Log: fix #66195 restore error handler is not ignored (zend_builtin_functions.c#1570)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Fri Jun 19 04:00:02 2026 UTC