php reference versus value
<pre><code>  class Test {
      private $arr;
      function __construct() {
          $this-&gt;arr = array('test');
      }

      function getArr() {
          return $this-&gt;arr;
      }
  }
  $a = new Test();
  $b = $a-&gt;getArr();
  $b[0][0] = 'a';
  $s = $a-&gt;getArr(); 
  echo $s[0]
</code></pre>

<p>Why does this echo test instead of aest? Does PHP copy the array and the contents of the array when returning it? How do I get an array in which I can change the strings and have it reflected in the object?</p>
