PHP 7.2.0 Beta 3 Released

Voting

Please answer this simple SPAM challenge: nine plus zero?
(Example: nine)

The Note You're Voting On

developer at sirspot dot com
13 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