On Wed, 12 May 2004 08:41 pm, Jordi Canals wrote: > A) $object = new MyClass; > B) $object =& new MyClass;
> 1) In case A, PHP creates a new object and returns a Copy of this new > object, so really I will have the object two instances for the object in > memory ... > > 2) In case B, PHP creates a noew object and returns a reference to this > newly created object. In this case there is only one instance of the > object. > > Does it works that way? If not, What is exactly the difference? You are quite correct... http://php.net/references --markc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php