note 113384 added to language.variables.scope
| From: | TomasBinek | Date: | Fri, 04 Oct 2013 13:31:38 +0000 |
| Subject: | note 113384 added to language.variables.scope | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196464@lists.php.net to get a copy of this message | ||
Be careful when using autoloaders:
Any variables that are declared in autoloaded files in global context are in fact local variables to
the autoload function.
Suggestion:
Use explicit global keyword even in global context of a file.
----
Server IP: 69.147.83.199
Probable Submitter: 194.228.76.39
----
Manual Page -- http://php.net/manual/en/language.variables.scope.php
Edit -- https://master.php.net/note/edit/113384
Del: integrated -- https://master.php.net/note/delete/113384/integrated
Del: useless -- https://master.php.net/note/delete/113384/useless
Del: bad code -- https://master.php.net/note/delete/113384/bad+code
Del: spam -- https://master.php.net/note/delete/113384/spam
Del: non-english -- https://master.php.net/note/delete/113384/non-english
Del: in docs -- https://master.php.net/note/delete/113384/in+docs
Del: other reasons-- https://master.php.net/note/delete/113384
Reject -- https://master.php.net/note/reject/113384
Search -- https://master.php.net/manage/user-notes.php