title: Getting static property from a class with dynamic class name in PHP
body: <p>I have this:</p>
  
  <ul>
  <li>one string variable which holds the class name (<code>$classname</code>)</li>
  <li>one string variable with holds the property name (<code>$propertyname</code>)</li>
  </ul>
  
  <p>I want to get that property from that class, the problem is, the property is static and I don't know how to do that.</p>
  
  <p>If the property weren't static, it would have been:</p>
  
  <pre><code>$classname-&gt;$propertyname;
  </code></pre>
  
  <p>if the property were a method, I could have used call_user_function</p>
  
  <pre><code>call_user_func(array($classname, $propertyname));
  </code></pre>
  
  <p>But in my case, am I just lost. I am however hoping that it is possible. With the thousands of functions that PHP has, he'd better have something for this as well. Maybe I'm missing something?</p>
  
  <p>Thanks!</p>
  
  <p>Edit:</p>
  
  <ul>
  <li>for those with <a href="http://php.net/manual/en/function.eval.php" rel="noreferrer">eval()</a> solutions: thanks, but it is out of the question</li>
  <li>for those with <a href="http://php.net/manual/en/function.get-class-vars.php" rel="noreferrer">get _class _vars()</a> solutions: thanks, but it seems it returns <strong>"the default properties of the given class"</strong> (php.net), and yes, I would like that value to be changable (even though it does help me in some of the cases)</li>
  </ul>