note 57365 added to language.references
| From: | pike at kw dot nl | Date: | Sat, 01 Oct 2005 13:08:03 +0000 |
| Subject: | note 57365 added to language.references | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96137@lists.php.net to get a copy of this message | ||
if your object seems to "forget" assignments you make after instantiation, realize that in
$foo = new Bar()
the variable on the left hand is a *copy* of the variable on the right hand. As a result, &
references made during instantiation may point to the righthandside version of Bar() and not to
$foo. you'd better use
$foo = & new Bar()
----
Manual Page -- http://www.php.net/manual/en/language.references.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57365
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57365&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57365&report=yes
Search -- http://master.php.net/manage/user-notes.php