note 104064 modified in language.types.array by danbrown

From: Date: Fri, 20 May 2011 14:28:15 +0000
Subject: note 104064 modified in language.types.array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179907@lists.php.net to get a copy of this message
please note that when arrays are copied, the "reference status" of their members is preserved (http://www.php.net/manual/en/language.references.whatdo.php). --was-- please note that when arrays are copied, the "reference status" of their members is preserved (http://www.php.net/manual/en/language.references.whatdo.php): "While not being strictly an assignment by reference, expressions created with the language construct array() can also behave as such by prefixing & to the array element to add. ......................... Note, however, that references inside arrays are potentially dangerous. Doing a normal (not by reference) assignment with a reference on the right side does not turn the left side into a reference, but references inside arrays are preserved in these normal assignments. This also applies to function calls where the array is passed by value." (this is what mortoray's comment below is about (http://www.php.net/manual/en/language.types.array.php#50036)) http://php.net/manual/en/language.types.array.php

« previous php.notes (#179907) next »