<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Predefined Constants</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="session.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="session.examples.html">Examples</a></div> <div class="up"><a href="book.session.html">Sessions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="session.constants" class="appendix"> <h1>Predefined Constants</h1> <p class="simpara"> 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. </p> <dl> <dt id="constant.sid"> <span class="term"> <strong><code>SID</code></strong> (<span class="type"><a href="language.types.string.html" class="type string">string</a></span>) </span> <dd> <span class="simpara"> Constant containing either the session name and session ID in the form of <em>"name=ID"</em> or empty string if session ID was set in an appropriate session cookie. This is the same id as the one returned by <span class="function"><a href="function.session-id.html" class="function">session_id()</a></span>. </span> </dd> </dt> <dt id="constant.php-session-disabled"> <span class="term"> <strong><code>PHP_SESSION_DISABLED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type int">int</a></span>) </span> <dd> <span class="simpara"> Since PHP 5.4.0. Return value of <span class="function"><a href="function.session-status.html" class="function">session_status()</a></span> if sessions are disabled. </span> </dd> </dt> <dt id="constant.php-session-none"> <span class="term"> <strong><code>PHP_SESSION_NONE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type int">int</a></span>) </span> <dd> <span class="simpara"> Since PHP 5.4.0. Return value of <span class="function"><a href="function.session-status.html" class="function">session_status()</a></span> if sessions are enabled, but no session exists. </span> </dd> </dt> <dt id="constant.php-session-active"> <span class="term"> <strong><code>PHP_SESSION_ACTIVE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type int">int</a></span>) </span> <dd> <span class="simpara"> Since PHP 5.4.0. Return value of <span class="function"><a href="function.session-status.html" class="function">session_status()</a></span> if sessions are enabled, and a session exists. </span> </dd> </dt> </dl> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="session.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="session.examples.html">Examples</a></div> <div class="up"><a href="book.session.html">Sessions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>