PHP 4.0 Bug #10120: implode(), if empty elements exist

From: Date: Mon, 02 Apr 2001 19:17:43 +0000
Subject: PHP 4.0 Bug #10120: implode(), if empty elements exist
Groups: php.dev 
Request: Send a blank email to php-dev+get-50614@lists.php.net to get a copy of this message
From: christian.krause@metis.de Operating system: Win 98se PHP version: 4.0.4pl1 PHP Bug Type: *Function Specific Bug description: implode(), if empty elements exist exploding and imploding a string (seperated by "+"): $a = "11+12+13+14+++++++++"; echo ("a befor execution: ".$a."<BR>"); list( $r["A"], $r["B"], $r["C"], $r["D"], $r["E"], $r["F"], $r["G"], $r["H"], $r["I"], $r["J"], $r["K"], $r["L"], $r["M"]) = explode("+", $a); $a = implode("+", $r); echo ("a after execution: ".$a."<BR>"); I expect an output (like PHP 3.0.17): a befor execution: 11+12+13+14+++++++++ a after execution: 11+12+13+14+++++++++ but the output is (in current version): a befor execution: 11+12+13+14+++++++++ a after execution: +++++++++14+13+12+11 after execution the string is vis versus. It happens only if I try to implode emty elements. The behaviour is different to PHP 3.0.X -- Edit Bug report at: http://bugs.php.net/?id=10120&edit=1

« previous php.dev (#50614) next »