Predefined variables
PHP Manual

$_REQUEST

(No version information available, might be only in CVS)

$_REQUEST — Request variables

Description

An associative array consisting of the contents of $_GET, $_POST, and $_COOKIE.

Variables provided to the script via the GET, POST, and COOKIE input mechanisms, and which therefore cannot be trusted. The presence and order of variable inclusion in this array is defined according to the PHP variables_order configuration directive. This array has no direct analogue in versions of PHP prior to 4.1.0.

When running on the command line , this will not include the argv and argc entries; these are present in the $_SERVER array.

If the register_globals directive is set, then these variables will also be made available in the global scope of the script; i.e., separate from the $_REQUEST array. For related information, see the security chapter titled Using Register Globals. These individual globals are not superglobals.

ChangeLog

Version Description
4.3.0 $_FILES information was removed from $_REQUEST.
4.1.0 Introduced $_REQUEST.

Notes

Note: This is a 'superglobal', or automatic global, variable. This simply means that it is available in all scopes throughout a script. There is no need to do global $variable; to access it within functions or methods.

See Also


Predefined variables
PHP Manual