note 104064 added to language.types.array
| From: | mlvljr at osu1 dot php dot net | Date: | Fri, 20 May 2011 13:37:27 +0000 |
| Subject: | note 104064 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179901@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):
"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))
----
Server IP: 69.147.83.197
Probable Submitter: 178.71.27.65
----
Manual Page -- http://www.php.net/manual/en/language.types.array.php
Edit -- https://master.php.net/note/edit/104064
Del: integrated -- https://master.php.net/note/delete/104064/integrated
Del: useless -- https://master.php.net/note/delete/104064/useless
Del: bad code -- https://master.php.net/note/delete/104064/bad+code
Del: spam -- https://master.php.net/note/delete/104064/spam
Del: non-english -- https://master.php.net/note/delete/104064/non-english
Del: in docs -- https://master.php.net/note/delete/104064/in+docs
Del: other reasons-- https://master.php.net/note/delete/104064
Reject -- https://master.php.net/note/reject/104064
Search -- https://master.php.net/manage/user-notes.php