#40590 [Opn->Bgs]: list($k,$v) = $v; gives unexpected output
| From: | iliaa@php.net | Date: | Sat, 24 Feb 2007 15:09:25 +0000 |
| Subject: | #40590 [Opn->Bgs]: list($k,$v) = $v; gives unexpected output | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109467@lists.php.net to get a copy of this message | ||
ID: 40590
Updated by: iliaa@php.net
Reported By: black at scene-si dot org
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: linux
PHP Version: 5.2.1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
In PHP 5 this is the expected behavior.
Previous Comments:
------------------------------------------------------------------------
[2007-02-22 13:26:58] black at scene-si dot org
Description:
------------
list() overwriting variable, unexpected result (different from php4).
Reproduce code:
---------------
$v = array("00","-- Day --");
list($k,$v) = $v;
var_dump(array($k,$v));
Expected result:
----------------
Var dump should return:
array(2) {
[0]=> string(2) "00"
[1]=> string(11) "-- Day -- "
}
Actual result:
--------------
Var dump returns:
array(2) {
[0]=> string(1) "-"
[1]=> string(11) "-- Day -- "
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40590&edit=1