Array

Description

$GLOBALS

Has a reference to every variable that has global scope in a PHP program. Many of the variables in it are also in other superglobal arrays

$_SERVER

Includes everything sent by server in the HTTP response, such as the name of the currently executing script, server name, version of HTTP, remote IP address, and so on. Although most Web server software produces the same server variables, not all do, and not all server variables necessarily have data in them

$_GET

Contains all the querystring variables that were attached to the URL, or produced as a result of using the GET method

$_POST

Contains all the submitted form variables and their data. You use variables from the $_POST or $_REQUEST arrays extensively in most of your PHP programs. For example, to make use of a username or password (or any other data) submitted as part of a form, you'll use PHP variables from the $_REQUEST array

$_COOKIE

Contains all cookies sent to the server by the browser. They are turned into variables you can read from this array, and you can write cookies to the user's browser using the setcookie() function. Cookies provide a means of identifying a user across page requests (or beyond, depending upon when the cookie expires) and are often used automatically in session handling

$_FILES

Contains any items uploaded to the server when the POST method is used. It's different from the $_POST array because it specifically contains items uploaded (such as an uploaded image file), not the contents of submitted form fields

$_ENV

Contains data about the environment the server and PHP are operating in, such as the computer name, operating system, and system drive

$_REQUEST

Contains the contents of the $_GET, $_POST, and $COOKIE arrays, all in one

$_SESSION

Contains all variables that are currently registered as session variables. Because you have programmatic control over the variables registered in the session, the contents of this array at any given moment depend on what your program does and whether you use sessions