<html>
<body>
$x = 5;
$y = 10;
function myTest() {
$GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];
}
myTest();
echo $y;
</body>
<!-- Mirrored from www.w3schools.com/php7/phptryit.asp?filename=tryphp_var_globals by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:40:15 GMT -->
</html>