src/Session.php
public static function destroy()
    {
        if (\session_status() !== PHP_SESSION_ACTIVE) {
            return false;
        }
        foreach (\array_keys($_SESSION) as $key) {
            unset($_SESSION[$key]);
        }
        self::$cfgStatic['id'] = null;
        $success = \session_destroy();
        if (!$success) {
            return false;
        }
        /*
            Clear cookie so new session not automatically started on next page load
            If strict mode is enabled... this isn't exactly necessary...  a new id will be used..
            however, we may not want to start a new session
        */
        \setcookie(
            self::$cfgStatic['name'],
            '',
            \time()-60*60*24,
            self::$cfgStatic['cookiePath'],
            self::$cfgStatic['cookieDomain'],
            self::$cfgStatic['cookieSecure'],
            self::$cfgStatic['cookieHttponly']
        );
        return $success;
    }
public static function destroy()
    {
        if (\session_status() !== PHP_SESSION_ACTIVE) {
            return false;
        }
        foreach (\array_keys($_SESSION) as $key) {
            unset($_SESSION[$key]);
        }
        self::$cfgStatic['id'] = null;
        $success = \session_destroy();
        if (!$success) {
            return false;
        }
        /*
            Clear cookie so new session not automatically started on next page load
            If strict mode is enabled... this isn't exactly necessary...  a new id will be used..
            however, we may not want to start a new session
        */
        \setcookie(
            self::$cfgStatic['name'],
            '',
            \time()-60*60*24,
            self::$cfgStatic['cookiePath'],
            self::$cfgStatic['cookieDomain'],
            self::$cfgStatic['cookieSecure'],
            self::$cfgStatic['cookieHttponly']
        );
        return $success;
    }
public static function destroy ( ) { if ( \ session_status ( ) !== PHP_SESSION_ACTIVE ) { return false ; } foreach ( \ array_keys ( $ _SESSION ) as $ key ) { unset ( $ _SESSION [ $ key ] ) ; } self :: $ cfgStatic [ 'id' ] = null ; $ success = \ session_destroy ( ) ; if ( ! $ success ) { return false ; } /*
            Clear cookie so new session not automatically started on next page load
            If strict mode is enabled... this isn't exactly necessary...  a new id will be used..
            however, we may not want to start a new session
        */ \ setcookie ( self :: $ cfgStatic [ 'name' ] , '' , \ time ( ) - 60 * 60 * 24 , self :: $ cfgStatic [ 'cookiePath' ] , self :: $ cfgStatic [ 'cookieDomain' ] , self :: $ cfgStatic [ 'cookieSecure' ] , self :: $ cfgStatic [ 'cookieHttponly' ] ) ; return $ success ; }
Destroys all data registered to session
Removes session cookie

@return boolean
Destroys all data registered to session Removes session cookie