title: Are different PHP variable variables that resolve to the same variable name the same variable?
body: <p>Let's say I have an array of strings that I use to create variable variables:</p>
  
  <pre><code>$var_arr = ["item1", "item2", "item3"];
  foreach ($var_arr as $item) {
      $$item = array();
  }
  </code></pre>
  
  <p>Then elsewhere in my code I have to recreate the variable variable based on a different data source:</p>
  
  <pre><code>$user_input = [ "prod1" =&gt; "widget", "qty1" =&gt; 3, "prod2" =&gt; "thingy", "qty2" =&gt; 1, "prod3" =&gt; "dingus", "qty3" =&gt; 7 ];
  foreach ($user_input as $key =&gt; $value) {
      $a = "item" . substr($key, -1);
      array_push($$a, $value);
  }
  </code></pre>
  
  <p>Are $$item and $$a the same variable, or do they reference different blocks of memory?</p>