|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-17 04:43 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 22:00:01 2025 UTC |
Description: ------------ explode on an empty string creates an array with a single blank element, instead of an empty array (with no elements). This means that explode/implode do not yield reversible results when an empty array is used (though, they do otherwise -- when the array is non-empty). This is a duplicate of #699, but I'm resubmitting since #699 was closed with no explanation a long time ago. Reproduce code: --------------- $a = array(); $b = explode(":", implode(":", $a)); print "a: "; print_r($a); print "<p>b: "; print_r($b); Expected result: ---------------- a: Array ( ) b: Array ( ) Actual result: -------------- a: Array ( ) b: Array ( [0] => )