PHP provides a large number of predefined variables to any script which it runs.
Many of these variables, however, cannot be fully documented as they are dependent upon which server is running,
the version and setup of the server, and other factors.
Some of these variables will not be available when PHP is run on the command line.
For a listing of these variables, please see the section on Reserved Predefined Variables.
In PHP 4.2.0 and later, the default value for the PHP directive register_globals is off.
This is a major change in PHP. Having register_globals off affects the set of predefined variables
available in the global scope. For example, to get DOCUMENT_ROOT you'll use
$_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT,
or $_GET['id'] from the URL http://www.example.com/test.php?id=3
instead of $id,
or $_ENV['HOME'] instead of $HOME.