PHP 4.0 Bug #2755 Updated: new Object() scribbles on old references

From: Date: Mon, 22 Nov 1999 15:58:51 +0000
Subject: PHP 4.0 Bug #2755 Updated: new Object() scribbles on old references
Groups: php.dev 
Request: Send a blank email to php-dev+get-12921@lists.php.net to get a copy of this message
ID: 2755 Updated by: zeev Reported By: duncan@emarketeers.com Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: Your understanding of the semantics is wrong. When you write: $y=&$x; from that point onward, $y and $x are the same thing - nothing can unbind them. When you assign a new object into $x, it's identical to assigning the object into $y; Both $x and $y will be pointing to the same value, be it a string, an array, or a newly created object. Full Bug description available at: http://bugs.php.net/version4/?id=2755

« previous php.dev (#12921) next »