What is the role of php super global variables

藏色散人
Release: 2023-03-01 20:24:01
Original
2936 people have browsed it

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
Copy after login

Please visit the "Super Global Variables" chapter: https://www.php.cn/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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!