title: PHP, getting Undefined property: stdClass::$id but it definitely exists
body: <p>So it's really simple code and I am yanking my hair out with the problem.</p>
  
  <pre><code>//I first retrieve some JSON info (confirmed to work fine)
  $file=file_get_contents('url');
  //I then decode and print to verify (still working)
  $somename=json_decode($file);
  </code></pre>
  
  <p>I print it out just to make sure it works (it does):</p>
  
  <pre><code>print_r($somename);
  </code></pre>
  
  <p>The print out reads as follows:</p>
  
  <pre><code>stdClass Object ( [id] =&gt; 456456456 [name] =&gt; somename [Stuff01] =&gt; 55 [Stuff02] =&gt; 25 [Stuff03] =&gt; 123132123132 ) ) 
  </code></pre>
  
  <p>Now I just want to get the value in the 'id' key so I use the appropriate object call:</p>
  
  <pre><code>$thisID=$somename-&gt;{'id'};
  </code></pre>
  
  <p>But I get the error:</p>
  
  <blockquote>
    <p><strong>Notice</strong>: Undefined property: <code>stdClass::$id</code></p>
  </blockquote>
  
  <p>I print_r every time so I know it's there. I can see it. What am I doing wrong? </p>
  
  <p>I have had no problems doing this exact thing many times.</p>