private static function unserialize($data)
    {
        $hasBuffer = isset($_SESSION);
        $buffer = $_SESSION;
        session_decode($data);
        $session = $_SESSION;

        if ($hasBuffer) {
            $_SESSION = $buffer;
        } else {
            unset($_SESSION);
        }

        return $session;
    }
private static function unserialize($data)
    {
        $hasBuffer = isset($_SESSION);
        $buffer = $_SESSION;
        session_decode($data);
        $session = $_SESSION;

        if ($hasBuffer) {
            $_SESSION = $buffer;
        } else {
            unset($_SESSION);
        }

        return $session;
    }
private static function unserialize ( $ data ) { $ hasBuffer = isset ( $ _SESSION ) ; $ buffer = $ _SESSION ; session_decode ( $ data ) ; $ session = $ _SESSION ; if ( $ hasBuffer ) { $ _SESSION = $ buffer ; } else { unset ( $ _SESSION ) ; } return $ session ; }
Given raw session data return the unserialized array.
Used to check if the session is really empty before writing.

@since Symphony 2.3.3
@param string $data
The serialized session data
@return array
The unserialised session data
Given raw session data return the unserialized array . Used to check if the session is really empty before writing .