Home >Backend Development >PHP Tutorial >php super global variable
PHP Super Global Array, also known as PHP predefined array, is built into the PHP engine and does not need to be redefined by developers. When a PHP script runs, PHP automatically places some data in a super global array.
php super global variable list
$_GET[] Get the variable array submitted by the GET method
$_POST[] Get the variable array submitted by the POST method
$_COOKIE[] Get and set the cookie identifier of the current website
$_SESSION[ ] Obtain the unique identification of the current user access, in the form of an array, such as sessionid and custom session data
$_ENV[] Current php environment variable array
$_SERVER[] Current php server variable array
$_FILES[] Submitted when uploading files Parameter values to the current script, reflected in the form of an array
$_REQUEST[] contains all requests submitted by the current script, all actions of $_GET, $_POST, $_COOKIE, $_SESSION
$GLOBALS[] contains all super globals of the executing script Variable reference content
PHP system constant
__FILE__ The absolute path and file name of the current PHP program script
__LINE__ The line number where the constant is stored
__FUNCTION__ The function name where the constant is stored
__CLASS__ The name of the class where the constant is stored
PHP_VERSION Stores the current PHP version number, which can also be obtained through the PHPVERSION() function.
PHP_OS stores the operating system of the current server