<html>
<body>
$x = 5;
$y = 10;
function myTest() {
$GLOBALS['y'] = $GLOBALS['x'] + $GLOBALS['y'];
}
myTest();
echo $y;
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_var_globals by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:29:30 GMT -->
</html>