title: How to access dynamic property by using variable?
body: <p>See:</p>
  
  <pre><code>$class_members = get_class_vars(__CLASS__);
  
  foreach($class_members as $key =&gt; $value)
  {
      if (strpos($key, '_output') === 0)
      {
          // I want to eval() this
          $code = '$this-&gt;' . $key . ' = 0;';
      }
  }
  </code></pre>
  
  <p>Assume I want to assign the value <code>0</code> to all class members that begin with <code>_output</code>. I plan to use <code>eval</code>. <strong>Good or bad idea?</strong></p>