title: isset() with dynamic property names
body: <p>Why does <code>isset()</code> not work when the property names are in variables?</p>
  
  <pre><code>$Object = new stdClass();
  $Object-&gt;tst = array('one' =&gt; 1, 'two' =&gt; 2);
  
  $tst = 'tst'; $one = 'one';
  var_dump( $Object, isset( $Object-&gt;tst['one'] ), isset( $Object-&gt;$tst[ $one ] ) );
  </code></pre>
  
  <p>outputs the following:</p>
  
  <pre><code>object(stdClass)#39 (1) {
    ["tst"]=&gt;
    array(2) {
      ["one"]=&gt;
      int(1)
      ["two"]=&gt;
      int(2)
    }
  }
  bool(true)
  bool(false) // was expecting true here..
  </code></pre>
  
  <hr>
  
  <p><strong>Edit:</strong> went on toying around with the code, and found out that</p>
  
  <pre><code>var_dump( $Object-&gt;$tst['one'] );
  </code></pre>
  
  <p>outputs a Notice:</p>
  
  <pre><code>E_NOTICE: Undefined property: stdClass::$t
  </code></pre>
  
  <p>So I think the problem is that the <code>$tst[...]</code> part is evaluated in 'string mode' (evaluating to the first character in the string; in this case "t"), before going onto fetching the property from the object;</p>
  
  <pre><code>var_dump( $tst, $tst['one'] ); // string(3) "tst" string(1) "t"
  </code></pre>
  
  <hr>
  
  <p><strong>Solution:</strong> is to put braces around the variable name (<code>$this-&gt;{$tst}</code>), to tell the interpreter to retrieve its <em>value</em> first, and then evaluate the <code>[...]</code> part:</p>
  
  <pre><code>var_dump( $Object-&gt;{$tst}['one'] ); // int(1) yay!
  </code></pre>