note 76270 added to language.references.whatdo
| From: | Stephen at osu1 dot php dot net | Date: | Sun, 08 Jul 2007 21:56:37 +0000 |
| Subject: | note 76270 added to language.references.whatdo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128308@lists.php.net to get a copy of this message | ||
Note that in the following:
$a =& $b;
while they both will end up referring to the same content, the content of $b from before the
statement is preserved, whereas the content of $a from before the statement is deleted and replaced
with the content of $b. In other words, you might say that $a is "assigned a value equal to a
reference to $b" For example:
$a = 4;
$b = 5;
$a =& $b;
print 'a = ' . $a . '<br>';
print 'b = ' . $b;
prints:
a = 5
b = 5
So yes, they end up becoming the same thing, but it does matter which comes first in the assignment
statement.
This is obvious once you know it, but it's not stated explicitly above for newcomers.
----
Server IP: 208.69.120.35
Probable Submitter: 68.163.193.97
----
Manual Page -- http://www.php.net/manual/en/language.references.whatdo.php
Edit -- https://master.php.net/note/edit/76270
Del: integrated -- https://master.php.net/note/delete/76270/integrated
Del: useless -- https://master.php.net/note/delete/76270/useless
Del: bad code -- https://master.php.net/note/delete/76270/bad+code
Del: spam -- https://master.php.net/note/delete/76270/spam
Del: non-english -- https://master.php.net/note/delete/76270/non-english
Del: in docs -- https://master.php.net/note/delete/76270/in+docs
Del: other reasons-- https://master.php.net/note/delete/76270
Reject -- https://master.php.net/note/reject/76270
Search -- https://master.php.net/manage/user-notes.php