PHP's =& operator

Kev picture Kev · May 8, 2011 · Viewed 53.6k times · Source

Are both these PHP statements doing the same thing?:

$o =& $thing;

$o = &$thing;

Answer

judda picture judda · May 8, 2011

Yes, they are both the exact same thing. They just take the reference of the object and reference it within the variable $o. Please note, thing should be variables.