php8.5
Home/ Manual/ session / functions/ session_status

session_status

PHP function Edit on GitHub ✎

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

Returns the current session status

Description

session_status(): int

session_status() is used to return the current session status.

Parameters Parameters

Return Values

  • PHP_SESSION_DISABLED if sessions are disabled.
  • PHP_SESSION_NONE if sessions are enabled, but none exists.
  • PHP_SESSION_ACTIVE if sessions are enabled, and one exists.

See Also

Source: reference/session/functions/session-status.xml · from the official PHP manual (php/doc-en)