(PHP 4, PHP 5, PHP 7)
$GLOBALS — References all variables available in global scope
An associative array containing references to all variables which are currently defined in the global scope of the script. The variable names are the keys of the array.
Example #1 $GLOBALS example
The above example will output something similar to:
$foo in global scope: Example content $foo in current scope: local variable