which superglobal variable have access to get, post and cookies value?
1. $GLOBALS is a PHP super global variable which is used to access global variables from
anywhere in the PHP script.
2. PHP stores all global variables in an array called $GLOBALS[index]. The index holds the
name of the variable.
3. Program:
<!DOCTYPE html>
<html>
<body>
<?php
$x = 36;
$y = 25;
function addition() {
$GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y'];
}
addition();
echo $z;
?>
</body>
</html>
Output: 61