Home  >  Article  >  Backend Development  >  What is the role of php super global variables

What is the role of php super global variables

藏色散人
藏色散人Original
2020-07-02 09:55:242964browse

The function of php super global variables is to make many predefined variables available in the entire scope of a script, and they can be accessed in functions or methods without executing "global $variable;".

What is the role of php super global variables

php super global variables

Super global variables were introduced in PHP 4.1.0. Built-in variables are always available in all scopes.

PHP Global Variables - Superglobal Variables

Many of the predefined variables in PHP are "superglobal", which means they are available throughout the entire scope of a script. They can be accessed within a function or method without executing global $variable;.

These super global variables are:

$GLOBALS
$_SERVER
$_REQUEST
$_POST
$_GET
$_FILES
$_ENV
$_COOKIE
$_SESSION

Please visit the "Super Global Variables" chapter: //m.sbmmt.com/php/php-superglobals.html

The above is the detailed content of What is the role of php super global variables. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn