View Single Post
Old 05-16-2009, 11:17 PM   #9 (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 gregor171 View Post
PHP Code:
public function __destruct(){
             global 
$_SESSION;
        
session_destroy();
        unset(
$_SESSION);

Generally clearing the session in destructor seems a good idea, but be careful that this is done on logout only.
Interesting, but why do you have to define the $_SESSION globally when it's already a super global array?
allworknoplay is offline  
Reply With Quote