#39840 [Opn->Bgs]: rewrite a multidimensional array causes a bug?
| From: | derick@php.net | Date: | Fri, 15 Dec 2006 09:32:50 +0000 |
| Subject: | #39840 [Opn->Bgs]: rewrite a multidimensional array causes a bug? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-106380@lists.php.net to get a copy of this message | ||
ID: 39840
Updated by: derick@php.net
Reported By: wesborland at email dot it
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Windows XP SP2
PHP Version: 5.2.0
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
.
Previous Comments:
------------------------------------------------------------------------
[2006-12-15 05:16:00] wesborland at email dot it
Description:
------------
replacing an array with a multidimensional array causes a variable
overlap
Reproduce code:
---------------
<?php
$show[0] = "james";
// php must unset($show[0]);
$show[0][1] = "kirk";
echo("<pre>");
print_r($show);
echo("</pre>");
foreach($show as $bb => $aa)
echo $bb . " -- " . $aa;
?>
Expected result:
----------------
Array
(
[0] => Array
(
[1] => kirk
)
)
0 -- Array
Actual result:
--------------
Array
(
[0] => jkmes
)
0 -- jkmes
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39840&edit=1