cvs: phpdoc /en/language control-structures.xml functions.xml

From: Date: Mon, 06 Jun 2005 15:26:22 +0000
Subject: cvs: phpdoc /en/language control-structures.xml functions.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368463@lists.php.net to get a copy of this message
vrana		Mon Jun  6 11:26:22 2005 EDT

  Modified files:              
    /phpdoc/en/language	control-structures.xml functions.xml 
  Log:
  Scope of functions inside functions (bug #33239)
  
http://cvs.php.net/diff.php/phpdoc/en/language/control-structures.xml?r1=1.118&r2=1.119&ty=u
Index: phpdoc/en/language/control-structures.xml
diff -u phpdoc/en/language/control-structures.xml:1.118
phpdoc/en/language/control-structures.xml:1.119
--- phpdoc/en/language/control-structures.xml:1.118	Tue May 24 05:55:58 2005
+++ phpdoc/en/language/control-structures.xml	Mon Jun  6 11:26:19 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.118 $ -->
+<!-- $Revision: 1.119 $ -->
  <chapter id="language.control-structures">
   <title>Control Structures</title>
 
@@ -1305,6 +1305,8 @@
      line on which the include occurs.  Any variables available at that line
      in the calling file will be available within the called file, from that
      point forward.
+     However, all functions and classes defined in the included file have the
+     global scope.
    </simpara>
    <para>
      <example>
http://cvs.php.net/diff.php/phpdoc/en/language/functions.xml?r1=1.58&r2=1.59&ty=u
Index: phpdoc/en/language/functions.xml
diff -u phpdoc/en/language/functions.xml:1.58 phpdoc/en/language/functions.xml:1.59
--- phpdoc/en/language/functions.xml:1.58	Sun Feb 13 17:32:44 2005
+++ phpdoc/en/language/functions.xml	Mon Jun  6 11:26:20 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.58 $ -->
+<!-- $Revision: 1.59 $ -->
  <chapter id="language.functions">
   <title>Functions</title>
 
@@ -109,6 +109,10 @@
      </programlisting>
     </example>
    </para>
+   <para>
+    All functions and classes in PHP have the global scope - they can be
+    called outside a function even if they were defined inside and vice versa.
+   </para>
    <simpara>
     PHP does not support function overloading, nor is it possible to
     undefine or redefine previously-declared functions.


Thread (1 message)

  • Jakub Vrana
« previous php.doc (#969368463) next »