A few predefined factors in PHP are “superglobals”, which implies that they are constantly open, paying little respect to scope – and you can get to them from any capacity, class or record without doing anything uncommon.
We have defined the brief about all superglobal variables.
These are superglobal variable-
$GLOBALS is a PHP superglobal variable which is used to access global variables from anywhere in the PHP script.
Paste this code into your text editor and see the result.
echo “This is example of” .” “.$example;
<p><?php funcname(); ?></p>
This is example of global-variable.