title: How to access an object's numeric property
body: <p>When I run this bit</p>
  
  <pre><code>$data = (object)array(1,2,3);
  print_r($data);
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>stdClass Object
  (
      [0] =&gt; 1
      [1] =&gt; 2
      [2] =&gt; 3
  )
  </code></pre>
  
  <p>This is rather interesting because I've known up until now that an object's property name cannot start with a number. So if that is true it must mean that these values are not properties, but what are they then?</p>
  
  <p>A few ways I tried to access the values</p>
  
  <pre><code>$data[0]; // Fatal error:  Cannot use object of type stdClass as array
  $data-&gt;0; // Parse error:  syntax error, unexpected 0, expecting identifier
  $data-&gt;{0}; // Notice:  Undefined property: stdClass::$0
  </code></pre>
  
  <p>I'm not really interested in accessing the values rather than finding out how they are kept in the class if they're not properties and not indexed values.</p>