Understanding the =& operator...

From: Date: Fri, 25 Oct 2002 20:07:26 +0000
Subject: Understanding the =& operator...
Groups: php.general 
Request: Send a blank email to php-general+get-121465@lists.php.net to get a copy of this message
Ok, let me see if I have this right: When you do: $var = new myClass(); $var instantiates and holds a copy of myClass. But when you do: $var =& new myClass(); $var instantiates and references that instantiation? If so, then I'm curious - if you do: $var2 =& new myClass(); and you modify the member variables in $var2, will the member variables of $var be modified as well? Or does $var2 reference a seperate instantiation?

« previous php.general (#121465) next »