Static Method call from unknown object
<p>I want to call a static method from one of my objects. This is no problem if I know the name of the object, but in this case, I don't.<br>
I have an array with several object names and I want to call the method from one of this arrays elements. So, it looks something like this:</p>

<pre><code>function call_method($key)  {
    $tmp = array('key1' =&gt; 'objectname1','key2' =&gt; 'objectname2','key3' =&gt; 'objectname3');
    if(array_key_exists($key, $tmp))    {
        $tmp::static_method();
    }
}
</code></pre>

<p>But, this solution is not working. Does somebody know how to get this working?</p>
