I have just learned to use double colon in php. I have a class with many function inside:
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();
}
}
Now I included this auth.class.php in another file logout.php then called
auth::logout();
I have not found any error (except: "header already sent") when turning php error to E_ALL level.
I heard that scope resolution operator only works on static function. So I am in puzzle, please help me to understand it better... plz