vrana           Thu Oct 13 08:40:11 2005 EDT

  Modified files:              
    /phpdoc/en/reference/session        reference.xml 
  Log:
  unset($_SESSION[var]) works and is prefered even with register_globals
  register_globals globalizes $_SESSION (bug #34732)
  
http://cvs.php.net/diff.php/phpdoc/en/reference/session/reference.xml?r1=1.53&r2=1.54&ty=u
Index: phpdoc/en/reference/session/reference.xml
diff -u phpdoc/en/reference/session/reference.xml:1.53 
phpdoc/en/reference/session/reference.xml:1.54
--- phpdoc/en/reference/session/reference.xml:1.53      Thu Oct 13 08:05:32 2005
+++ phpdoc/en/reference/session/reference.xml   Thu Oct 13 08:40:08 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.53 $ -->
+<!-- $Revision: 1.54 $ -->
 <!-- Purpose: basic.session -->
 <!-- Membership: core -->
 
@@ -229,25 +229,6 @@
      </para>
     </warning>
     <para>
-     <example>
-      <title>
-       Unregistering a variable with <link 
-       linkend="ini.register-globals">register_globals</link>
-       enabled, after registering it using
-       <varname>$_SESSION</varname>.
-      </title>
-      <programlisting role="php">
-<![CDATA[
-<?php
-session_start();
-// With PHP 4.3 and later, you can also simply use the prior example.
-session_unregister('count');
-?>
-]]>
-      </programlisting>
-     </example>
-    </para>
-    <para>
      If <link
      linkend="ini.register-globals">register_globals</link>
      is enabled, then each global variable can be registered as session
@@ -264,13 +245,7 @@
        don't use <function>session_register</function>,
        <function>session_is_registered</function> or
        <function>session_unregister</function>.
-      </para>
-      <para>
-       If you enable <link
-        linkend="ini.register-globals">register_globals</link>,
-        <function>session_unregister</function> should be used since
-        session variables are registered as global variables when
-        session data is deserialized. Disabling <link
+        Disabling <link
         linkend="ini.register-globals">register_globals</link>
         is recommended for both security and performance reasons.
       </para>
@@ -282,6 +257,8 @@
      is enabled, then the global variables and the
      <varname>$_SESSION</varname> entries will automatically reference the
      same values which were registered in the prior session instance.
+     However, if the variable is registered by <varname>$_SESSION</varname>
+     then the global variable is available since the next request.
     </para>
     <para>
      There is a defect in PHP 4.2.3 and earlier.  If you register a new

Reply via email to