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

From: Date: Thu, 18 Nov 1999 15:26:43 +0000
Subject: PHP 4.0 Bug #2755: new Object() scribbles on old references
Groups: php.dev 
Request: Send a blank email to php-dev+get-12729@lists.php.net to get a copy of this message
From: duncan@emarketeers.com Operating system: Linux 2.2.9 (RedHat 6.0) PHP version: 4.0 Beta 3 PHP Bug Type: Scripting Engine problem Bug description: new Object() scribbles on old references new Object() does not create a new reference, but writes over the value of an old reference instead. class Thingy { var $instanceVar; } $x=new Thingy; $x->instanceVar=2; $y=&$x; $x=new Thingy; $x->instanceVar=3; echo $x->instanceVar $y->instanceVar"; prints 3 3 instead of the expected 3 2

« previous php.dev (#12729) next »