HP also stores all global variables in an array called $GLOBALS[index].
The index holds the name of the variable.
This array is also accessible from within functions and can be used to update global variables directly.
<?php
$x = 70;
$y = 7;
function myNum {
$GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];
}
myNum();
echo $y; // output is 77
?>