note 83725 added to language.variables.scope
| From: | gamifiq at gmail dot com | Date: | Mon, 09 Jun 2008 13:25:30 +0000 |
| Subject: | note 83725 added to language.variables.scope | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140271@lists.php.net to get a copy of this message | ||
Nota bene :
Imagine one file called myFile.php :
<?php
//myFile.php
$a = true;
?>
And a second file which includes it this way :
<?php
function LoadMe() {
//$a is not defined
include( 'myFile.php' );
//now $a is defined
}
//Obviously $a is not defined
LoadMe();
//Neither $a nor $GLOBALS['a'] are defined
?>
Beware ;)
----
Server IP: 195.221.21.36
Probable Submitter: 62.39.253.186
----
Manual Page -- http://www.php.net/manual/en/language.variables.scope.php
Edit -- https://master.php.net/note/edit/83725
Del: integrated -- https://master.php.net/note/delete/83725/integrated
Del: useless -- https://master.php.net/note/delete/83725/useless
Del: bad code -- https://master.php.net/note/delete/83725/bad+code
Del: spam -- https://master.php.net/note/delete/83725/spam
Del: non-english -- https://master.php.net/note/delete/83725/non-english
Del: in docs -- https://master.php.net/note/delete/83725/in+docs
Del: other reasons-- https://master.php.net/note/delete/83725
Reject -- https://master.php.net/note/reject/83725
Search -- https://master.php.net/manage/user-notes.php