Sessions
PHP Manual

The SessionHandler class

(PHP 5 >= 5.4.0)

Introduction

SessionHandler a file-based session save handler class and is the default implementation for PHP.

This class can be extended, and its methods overridden. It's interface, SessionHandlerInterface, can be implemented by a custom class as well, completely bypassing this default session handler.

An instance of this class, one extending it, or a custom class implementing SessionHandlerInterface, is passed to session_set_save_handler() in order to replace the currently configured session handler.

Class synopsis

SessionHandler implements SessionHandlerInterface {
/* Methods */
public bool close ( void )
public bool destroy ( string $session_id )
public bool gc ( int $maxlifetime )
public bool open ( string $save_path , string $session_id )
public string read ( string $session_id )
public bool write ( string $session_id , string $session_data )
}

Table of Contents


Sessions
PHP Manual