downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.session-is-registered.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.session.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.session-is-registered.php',
   
1 => 'session_is_registered',
  ),
 
'up' =>
  array (
   
0 => 'ref.session.php',
   
1 => 'Session Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.session-id.php',
   
1 => 'session_id',
  ),
 
'next' =>
  array (
   
0 => 'function.session-module-name.php',
   
1 => 'session_module_name',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.session-is-registered" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_is_registered</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">session_is_registered</span> &mdash; <span class="dc-title">Find out whether a global variable is registered in a session</span></p>

 </div>
 
 <a name="function.session-is-registered.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><b>session_is_registered</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$name</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Finds out whether a global variable is registered in a session.
  </p>
  <div class="warning"><b class="warning">Warning</b><p class="simpara">This function has been
<em class="emphasis">DEPRECATED</em> as of PHP 5.3.0 and <em class="emphasis">REMOVED</em>
as of PHP 6.0.0. Relying on this feature is highly discouraged.</p></div>
 </div>


 <a name="function.session-is-registered.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">name</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The variable name.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.session-is-registered.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   <b>session_is_registered()</b> returns <b><tt class="constant">TRUE</tt></b> if there is a
   global variable with the name <i><tt class="parameter">name</tt></i>
 registered in
   the current session, <b><tt class="constant">FALSE</tt></b> otherwise.
  </p>
 </div>


 <a name="function.session-is-registered.notes"></a><div class="refsect1 notes">
  <h3 class="title">Notes</h3>
  <blockquote><p><b class="note">Note</b>:
  
    If <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var> (or <var class="varname">$HTTP_SESSION_VARS</var>
    for PHP 4.0.6 or less) is used, use <a href="function.isset.php" class="function">isset()</a> to check a
    variable is registered in <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var>.
   <br />
  </p></blockquote>
  <div class="caution"><b class="caution">Caution</b>
   <p class="para">
    If you are using <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var>
    (or <var class="varname">$HTTP_SESSION_VARS</var>), do not use
    <a href="function.session-register.php" class="function">session_register()</a>,
    <b>session_is_registered()</b> and
    <a href="function.session-unregister.php" class="function">session_unregister()</a>.
   </p>
  </div>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites