nohn            Sun Feb 24 12:03:56 2002 EDT

  Modified files:              
    /phpdoc/en/appendices       migration4.xml 
  Log:
  fixing bug #15696
  
  
Index: phpdoc/en/appendices/migration4.xml
diff -u phpdoc/en/appendices/migration4.xml:1.18 
phpdoc/en/appendices/migration4.xml:1.19
--- phpdoc/en/appendices/migration4.xml:1.18    Thu Jan 17 22:32:22 2002
+++ phpdoc/en/appendices/migration4.xml Sun Feb 24 12:03:54 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
  <appendix id="migration4">
   <title>Migrating from PHP 3 to PHP 4</title>
        
@@ -421,6 +421,33 @@
     strange to understand that it deserved a change to prevent further
     problems in the future.
    </para>
+  </section>
+
+  <section id='migration4.variables'>
+   <title>Handling of global variables</title>
+   <para>
+    While handling of global variables had the focus on to be easy in
+    PHP3 and early versions of PHP4, the focus has changed to be more
+    secure. While in PHP3 following example worked fine, in PHP4 it
+    has to be unset($GLOBALS["id"]);. This is only one issue of global
+    variable handling. You should always have used $GLOBALS, with
+    newer versions of PHP4 you are forced to do so in most cases.
+   </para>
+   <example>
+    <programlisting role="php">
+<![CDATA[
+<?php
+$id=1;
+function test()
+{
+        global $id;
+       unset($id);
+}
+test();
+echo($id);
+]]>
+    </programlisting>
+   </example>
   </section>
 
  </appendix>


Reply via email to