title: Get PHP class property by string
body: <p>How do I get a property in a PHP based on a string? I'll call it <code>magic</code>. So what is <code>magic</code>?</p>
  
  <pre><code>$obj-&gt;Name = 'something';
  $get = $obj-&gt;Name;
  </code></pre>
  
  <p>would be like...</p>
  
  <pre><code>magic($obj, 'Name', 'something');
  $get = magic($obj, 'Name');
  </code></pre>