title: Call static method from a string name in PHP
body: <p>I need to call a static method of a class, but I only have a classname, not an instance of it. I am doing it this way.</p>
  
  <pre><code>$class = new "ModelName";
  $items = $class::model()-&gt;findAll();
  </code></pre>
  
  <p>It works on my computer, but when I move to the server, it throws an <code>unexpected T_PAAMAYIM_NEKUDOTAYIM</code>, so I think it actually expects model to be a variable instead of a method.</p>
  
  <p>PS: If it helps, it's Yii framework, so if there's another way to call the find() functions, it's ok to me.</p>
  
  <p>Thanks in advance</p>