Code has been added to clipboard!

Understanding PHP Superglobals

Example
<?php
$x = 50; 
$y = 5;
 
function addition() { 
    $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y']; 
}
 
addition(); 
echo $z; 
?>