title: How do you pass objects by reference in PHP 5?
body: <p>In PHP 5, are you required to use the <code>&amp;</code> modifier to pass by reference? For example,</p>
  
  <pre><code>class People() { }
  $p = new People();
  function one($a) { $a = null; }
  function two(&amp;$a) { $a = null; )
  </code></pre>
  
  <p>In PHP4 you needed the <code>&amp;</code> modifier to maintain reference after a change had been made, but I'm confused on the topics I have read regarding PHP5's automatic use of pass-by-reference, except when explicity cloning the object.</p>
  
  <p><strong>In PHP5, is the</strong> <code>&amp;</code> <strong>modifier required to pass by reference for all types of objects (variables, classes, arrays, ...)?</strong></p>