|   | 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 Group All rights reserved. | Last updated: Fri Oct 31 20:00:01 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