Double Colon is working on non static function also
<p>I have just learned to use double colon in php. I have a class with many function inside:</p>

<pre><code>class auth {

/* .... Other Functions ...*/

    public function logout ()
    {
        session_start();
        $_SESSION = array();
        if (ini_get("session.use_cookies")) {
            $params = session_get_cookie_params();
            setcookie(session_name(), '', time() - 42000,
                $params["path"], $params["domain"],
                $params["secure"], $params["httponly"]
            );
        }
        session_destroy();
    }

}
</code></pre>

<p>Now I included this auth.class.php in another file logout.php then called</p>

<pre><code>auth::logout();
</code></pre>

<p>I have not found any error (except: <strong>"header already sent"</strong>) when turning php error to E_ALL level.</p>

<p>I heard that scope resolution operator only works on static function. So I am in puzzle, please help me to understand it better... plz</p>
