SessionHandlerInterface::close

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

SessionHandlerInterface::closeセッションを閉じる

説明

public SessionHandlerInterface::close(): bool

現在のセッションを閉じます。この関数はセッションを閉じるときに自動的に実行されます。 あるいは、明示的に session_write_close() 経由で実行することもできます。

パラメータ

この関数にはパラメータはありません。

戻り値

返り値 (通常は、true が成功そして false が失敗を表します)。この値は PHP で内部的に処理されるものであることに注意しましょう。

add a note

User Contributed Notes 1 note

up
4
svenr at selfhtml dot org
9 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