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-unregister.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-unregister.php',
   
1 => 'session_unregister',
  ),
 
'up' =>
  array (
   
0 => 'ref.session.php',
   
1 => 'Session Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.session-start.php',
   
1 => 'session_start',
  ),
 
'next' =>
  array (
   
0 => 'function.session-unset.php',
   
1 => 'session_unset',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.session-unregister" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_unregister</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">session_unregister</span> &mdash; <span class="dc-title">Unregister a global variable from the current session</span></p>

 </div>
 
 <a name="function.session-unregister.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_unregister</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$name</tt></span>
   )</div>

  <p class="para rdfs-comment">
   <b>session_unregister()</b> unregisters the global variable
   named <i><tt class="parameter">name</tt></i>
 from the current 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-unregister.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-unregister.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <b><tt class="constant">TRUE</tt></b> on success or <b><tt class="constant">FALSE</tt></b> on failure.
  </p>
 </div>


 <a name="function.session-unregister.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.unset.php" class="function">unset()</a> to
    unregister a session variable. Do not <a href="function.unset.php" class="function">unset()</a>
    <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var> itself as this will disable the special
    function of the <var class="varname"><a href="reserved.variables.session.php" class="classname">$_SESSION</a></var> superglobal.
   <br />
  </p></blockquote>
  <div class="caution"><b class="caution">Caution</b>
   <p class="para">
    This function does not unset the corresponding global variable for
    <i><tt class="parameter">name</tt></i>
, it only prevents the variable from being
    saved as part of the session. You must call <a href="function.unset.php" class="function">unset()</a>
    to remove the corresponding global variable.
   </p>
  </div>
  <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>,
    <a href="function.session-is-registered.php" class="function">session_is_registered()</a> and
    <b>session_unregister()</b>.
   </p>
  </div>
 </div>


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