Variable Name | Where Defined | Effect |
variable 1 |
php_demo8.php3 (main) |
Available in php_demo8.inc (main), but not in function demo8_function2() |
variable 2 |
php_demo8.php3 (main) |
Variables defined in the $GLOBALS array are available everywhere |
variable 3 |
php_demo8.php3 (main) |
Variable3 is just like variable1, except it is available inside of the function demo8_function2() because it is defined as
as globally available inside of the the function. |
variable 4 |
demo8_function1() (function) |
Variable4 is not available anywhere but in the function where it was defined because it was not defined as a global. |
variable 5 |
demo8_function1() (function) |
Variable5 is available anywhere (where it is declared globally available) because it was defined a global in function demo8_fun
ction1() |