View Single Post
Old 05-16-2009, 08:21 PM   #7 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
How about clearing the session on the __destruct?

php Code:
class TalkPHP_Login
{
    public function __destruct()
    {
        session_destroy();
        unset($_SESSION);
    }
}

$pLogin = new TalkPHP_Login();
unset($pLogin);
What's the significance of calling session_destroy() before using unset() ??
allworknoplay is offline  
Reply With Quote