$GLOBALS

$GLOBALS

(PHP 4, PHP 5, PHP 7)

$GLOBALSReferences all variables available in global scope

Description

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.

Examples

Example #1 $GLOBALS example