title: casting stdClass to array - keys not accessible
body: <p>I'm running PHP7.0.9, when I do something like this:</p>
  
  <pre><code>$s = json_decode('{"1": "xxx"}');//decode json to stdClass
  $a = (array)$s;//cast to array
  die(var_dump($a, $a['1'], $a[1], count($a)));
  </code></pre>
  
  <p>I get this result:</p>
  
  <pre><code>array (size=1)
    '1' =&gt; string 'xxx' (length=3) //&lt;-- key 1 exists
  null // $a['1'] yields null
  null // $a[1] doesn't work either
  int 1 // count shows there is 1 element in the array
  </code></pre>
  
  <p>I was expecting this result:</p>
  
  <pre><code>array (size=1)
    '1' =&gt; string 'xxx' (length=3)
  string 'xxx' (length=3) // $a['1'] should work
  null
  int 1
  </code></pre>
  
  <p>My question: Why can't I access <code>$a['1']</code>, even though both <code>count</code>and a <code>var_dump</code> of the array tell me that this key exists? Is this a bug in PHP, or some kind of feature?</p>