Longhorn PHP 2019 Schedule


Please answer this simple SPAM challenge: seven minus three?
(Example: nine)

The Note You're Voting On

developer at sirspot dot com
15 years ago
Since references are more like hardlinks than pointers, it is not possible to change a reference to an object by using that same reference.  For example:

The following WILL NOT WORK as expected and may even crash the PHP interpreter:

$object =& $object->getNext();

However, by changing the previous statement to use a temporary reference, this WILL WORK:

$temp =& $object;
$object =& $temp->getNext();

<< Back to user notes page

To Top