title: php store array in array by reference
body: <p>I have the following problem. There are some php lines.</p>
  
  <p>In the var_dump of <code>$testArrayA</code>, the "def" entry with <code>test2</code> is NOT there because it was added
  after <code>$testArrayB</code> was added to <code>$testArrayA</code>.</p>
  
  <p>It seems to me that in my case, that <code>$testArrayB</code> is not stored by reference in <code>$testArrayA</code>. How can I store it per reference, what do I have to make to have "def" entry in the var_dump?</p>
  
  <p>Thanks alot in advance</p>
  
  <pre><code>$testArrayA = [];
  $testArrayB = [];
  $testArrayB["ghi"] = "test1";
  $testArrayA["abc"] = $testArrayB;
  $testArrayB["def"] = "test2";
  </code></pre>
  
  <p>The var_dump:</p>
  
  <pre><code>array(1) {
    ["abc"]=&gt;
      array(1) {
         ["ghi"]=&gt;
         string(5) "test1"
        }
  }
  </code></pre>