|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-15 09:32 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 17:00:01 2025 UTC |
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