diff --git a/language/control-structures.xml b/language/control-structures.xml index 14039050a6..948fa65ebc 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -1305,6 +1305,8 @@ require ('somefile.txt'); 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. diff --git a/language/functions.xml b/language/functions.xml index 6d658228fb..9e1cf5bcd3 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -1,5 +1,5 @@ - + Functions @@ -109,6 +109,10 @@ bar(); + + 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. + PHP does not support function overloading, nor is it possible to undefine or redefine previously-declared functions.