Code has been added to clipboard!
Storing Global PHP Variables
Example
<?php
$x =Â 20;
$y =Â 10;
function learnTest() {
    $GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];
}Â
learnTest();
echo $y; // outputs 30
?>