|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-11-22 16:58 UTC] zeev at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 10:00:02 2025 UTC |
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