different explanation
<p>The code</p>

<pre><code>$global_obj = null;
class my_class
{
       var $value;
       function my_class()
       {
               global $global_obj;
               $global_obj = &amp;$this;
       }
}
$a = new my_class;
$a-&gt;my_value = 5;
$global_obj-&gt;my_value = 10;
echo $a-&gt;my_value;
</code></pre>

<p>echoes 5, not 10.</p>

<p>"Upon first examination, it would seem that the constructor of my_class stores a reference to itself inside the $global_obj variable. Therefore, one would expect that, when we later change the value of $global_obj->my_value to 10, the corresponding value in $a would change as well. Unfortunately, the new operator does not return a reference, but a copy of the newly created object."</p>

<p>I still don't understand it, so can anyone please explain it differently, and help me understand?</p>
