What is $GLOBALS in PHP ?

$GLOBALS is a PHP super global variable which is used to access global variables from anywhere in the PHP script. PHP stores all global variables in an array called $GLOBALS[index]. The index holds the name of the variable.

function display()
$GLOBALS['v'] ="india";
echo $v;


since v is a variable present within $GLOBALS array, it is accessible form outside the function also.