|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-24 14:56 UTC] tony2001@php.net
[2006-08-24 15:02 UTC] max at hightech dot lv
[2006-08-24 15:08 UTC] max at hightech dot lv
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 13:00:01 2025 UTC |
Description: ------------ looks like after copy reference to some variable, source-variable start to be reference it self. Is it correct? In result we can't make copy array, if some of it element was used as reference. Reproduce code: --------------- $arr = array("TEXT" => "test"); $tmp =& $arr["TEXT"]; $zz = $arr; $zz["TEXT"] = 1; var_dump($arr); Expected result: ---------------- array(1) { ["TEXT"]=> string(4) "test" } Actual result: -------------- array(1) { ["TEXT"]=> &int(1) }