src/Request/Session.php
/**
	 * Destroy session
	 *
	 * @param bool $takeNewID - take new session ID
	 */
Destroy session
@param bool $takeNewID - take new session ID
Destroy session @param bool $takeNewID - take new session ID
public static function destroy(bool $takeNewID = true)
	{
		self::flush();
		session_unset();
		session_destroy();
		if (self::$sessionName) {
			setcookie(self::$sessionName, '', 1);
			session_name(self::$sessionName);
			session_set_cookie_params(self::$timeout);
		}
		self::start(); 
		if ($takeNewID) {
			session_regenerate_id(true);
			$SID = session_id();
			self::setSID($SID);
		}
		unset($_COOKIE[session_name()]);
	}
public static function destroy ( bool $ takeNewID = true ) { self :: flush ( ) ; session_unset ( ) ; session_destroy ( ) ; if ( self :: $ sessionName ) { setcookie ( self :: $ sessionName , '' , 1 ) ; session_name ( self :: $ sessionName ) ; session_set_cookie_params ( self :: $ timeout ) ; } self :: start ( ) ; if ( $ takeNewID ) { session_regenerate_id ( true ) ; $ SID = session_id ( ) ; self :: setSID ( $ SID ) ; } unset ( $ _COOKIE [ session_name ( ) ] ) ; }
Destroy session
 @param bool $takeNewID - take new session ID
Destroy session @param bool $takeNewID - take new session ID
//start new session //take new session ID