title: Object of std:: class cannot be converted to string
body: <p>Below is a sample json code that I want to access...This json is actually coming from an API. Whenever I copy and paste the entire json in json lint..It says valid json..   </p>
  
  <pre><code>foreach ($movies as $movie) {
  echo "theaters ".var_dump($movie-&gt;release_dates-&gt;theater)";
  }
  
  //Im actually trying to access a nested json in php... Something like
  {
  "movies":[{
  "tile":"Cowboys";
  "release_dates":{"theater":"2013-11-29"}, 
  so on....
  </code></pre>
  
  <p>Whenever I try to write the above it gives me an error <code>Object of stdclass cannot be converted to string</code> ....Or if I write</p>
  
  <pre><code>$x = json_decode(var_dump($movie-&gt;release_dates-&gt;theater), true)";
  echo "theaters "$x[0];
  </code></pre>
  
  <p>It gives an output like <code>string[10]:2013-11-25 string[10]:2013-11-30</code>....So on..What is the error....</p>