title: PHP array indexing: $array[$index] vs $array["$index"] vs $array["{$index}"]
body: <p>What is the difference, if any, between these methods of indexing into a PHP array:</p>
  <pre><code>$array[$index]
  $array[&quot;$index&quot;]
  $array[&quot;{$index}&quot;]
  </code></pre>
  <p>I'm interested in both the performance and functional differences.</p>
  <h3>Update:</h3>
  <p>(In response to @Jeremy) I'm not sure that's right. I ran this code:</p>
  <pre><code>  $array = array(100, 200, 300);
    print_r($array);
    $idx = 0;
    $array[$idx] = 123;
    print_r($array);
    $array[&quot;$idx&quot;] = 456;
    print_r($array);
    $array[&quot;{$idx}&quot;] = 789;
    print_r($array);
  </code></pre>
  <p>And got this output:</p>
  <pre><code>Array
  (
      [0] =&gt; 100
      [1] =&gt; 200
      [2] =&gt; 300
  )
  
  Array
  (
      [0] =&gt; 123
      [1] =&gt; 200
      [2] =&gt; 300
  )
  
  Array
  (
      [0] =&gt; 456
      [1] =&gt; 200
      [2] =&gt; 300
  )
  
  Array
  (
      [0] =&gt; 789
      [1] =&gt; 200
      [2] =&gt; 300
  )
  </code></pre>