$GLOBALS - References all variables available in global scope | PHP

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.

<?php
print '<pre>'.print_r($GLOBALS, 1).'</pre>';