PHP Conference Nagoya 2025

SessionHandlerInterface::close

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

SessionHandlerInterface::closeClose the session

Descrizione

public SessionHandlerInterface::close(): bool

Closes the current session. This function is automatically executed when closing the session, or explicitly via session_write_close().

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Il valore di ritorno (normalmente true in caso di successo, altrimenti false). Si noti che questo valore è restituito internamente a PHP per il processamento.

add a note

User Contributed Notes 1 note

up
5
svenr at selfhtml dot org
11 years ago
This method should release the exclusive lock that was acquired by the open() method.

Note that this will effectively serialize parallel requests, which affects performance for a single user session.

Not locking the resource would on the other hand allow for race conditions if two or more parallel requests change the session data.
To Top