Superglobal Variables PHP
suggest changeVersions
[{“Name”:“4.1”,“GroupName”:“PHP 4.x”},{“Name”:“4.2”,“GroupName”:“PHP 4.x”},{“Name”:“4.3”,“GroupName”:“PHP 4.x”},{“Name”:“5.0”,“GroupName”:“PHP 5.x”},{“Name”:“4.4”,“GroupName”:“PHP 4.x”},{“Name”:“5.1”,“GroupName”:“PHP 5.x”},{“Name”:“5.2”,“GroupName”:“PHP 5.x”},{“Name”:“5.3”,“GroupName”:“PHP 5.x”},{“Name”:“5.4”,“GroupName”:“PHP 5.x”},{“Name”:“5.5”,“GroupName”:“PHP 5.x”},{“Name”:“5.6”,“GroupName”:“PHP 5.x”},{“Name”:“7.0”,“GroupName”:“PHP 7.x”},{“Name”:“7.1”,“GroupName”:“PHP 7.x”}]
Introduction
Superglobals are built-in variables that are always available in all scopes.
Several predefined variables in PHP are “superglobals”, which means they are available in all scopes throughout a script. There is no need to do global $variable;
to access them within functions or methods.