PHP: Non static method called as it was static, how is that possible?
<p>is there anyway to call a non static method, as an static method?</p>

<p>I have found this call:</p>

<pre><code>$handler =&amp; ProfileHandler_Array::getInstance(
    array(  'username'        =&gt; $this-&gt;api_username,
            'certificateFile' =&gt; $this-&gt;api_certificate,
            'signature'       =&gt; $this-&gt;api_signature,
            'subject'         =&gt; $this-&gt;api_subject,
            'environment'     =&gt; (($this-&gt;api_test)?'Sandbox':'Live')
    )
</code></pre>

<p>And here you have getInstance() method:</p>

<pre><code>function getInstance($id, &amp;$handler)
{
    $classname = __CLASS__;
    $inst = new $classname($id, $handler);

    $result = $inst-&gt;_load();
    if (PayPal::isError($result)) {
        return $result;
    }

    $result = $inst-&gt;loadEnvironments();
    if (PayPal::isError($result)) {
        return $result;
    }

    return $inst;
}
</code></pre>

<p>and it doesn't give any errors!!!!</p>

<p>More clues: it's maybe an old code. </p>

<p>Regards</p>
