7.6. Assigning Object References
$adam = new user; $dave =& $adam;
When you do an object assignment using =, you create a new copy of an object. So, modifying one doesn't alter the other. But when you use =&, the two objects point at each other, so any changes made in the first are also made in the second:
$adam = new user; $adam->load_info('adam'); $dave =& $adam; $dave->load_info('dave');
The values in $adam are equal to those of $dave.
7.6.4. See Also
Copyright © 2003 O'Reilly & Associates. All rights reserved.