If Objects are passed by alias when would you pass by reference?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3611986/in-php-can-someone-explain-cloning-vs-pointer-reference">In PHP can someone explain cloning vs pointer reference?</a>  </p>
</blockquote>



<p>According to <a href="http://php.net/manual/en/language.oop5.references.php">http://php.net/manual/en/language.oop5.references.php</a></p>

<blockquote>
  <p>One of the key-points of PHP 5 OOP that is often mentioned is that "objects are passed by references by default". This is not completely true. This section rectifies that general thought using some examples.</p>
  
  <p>A PHP reference is an alias, which allows two different variables to write to the same value. As of PHP 5, an object variable doesn't contain the object itself as value anymore. It only contains an object identifier which allows object accessors to find the actual object. When an object is sent by argument, returned or assigned to another variable, the different variables are not aliases: they hold a copy of the identifier, which points to the same object.</p>
</blockquote>

<p>If objects are passed by alias or handler then in what situation would you actually want to pass by reference?</p>

<pre><code>myFunc($obj); // Pass by alias/handler

myFunc(&amp; $obj); // Pass by reference (when would you do this?)

myFunc(clone $obj); // Create a new object
</code></pre>

<p>What are the different use-cases for each of these?</p>
