Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Runtime ConfigurationExamples>
^SessionsLast updated: Mon, 26 Oct 2026

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

SID (string)

Constant containing either the session name and session ID in the form of "name=ID" or empty string if session ID was set in an appropriate session cookie. This is the same id as the one returned by session_id().

Warning

This constant has been deprecated as of PHP 8.4.0.

PHP_SESSION_DISABLED (int)

Return value of session_status() if sessions are disabled.

PHP_SESSION_NONE (int)

Return value of session_status() if sessions are enabled, but no session exists.

PHP_SESSION_ACTIVE (int)

Return value of session_status() if sessions are enabled, and a session exists.


<Runtime ConfigurationExamples>
^SessionsLast updated: Mon, 26 Oct 2026