title: Accessing deeper object properties via string
body: <p>I know this looks weird, but i need to access deeper object properties only when knowing the path from a string ("b->c") like you see below.</p>
  
  <pre><code>$a = new stdClass();
  $a-&gt;b = new stdClass();
  
  $a-&gt;b-&gt;c = "123";
  
  $exp1 = "c";
  
  $exp2 = "b-&gt;c";
  
  print_r($a-&gt;b-&gt;$exp1); // works
  print_r($a-&gt;$exp2);  // not so much
  </code></pre>
  
  <p>Any way to access the $a->b->c property when knowing only the object $a and having a string like "b->c" ?</p>