I'm using WAMP and tried different browsers. This example is copy paste from w3schools. But I get:
Parse error: syntax error, unexpected ' ' (T_STRING) in C:\wamp64\www\tuto\otro.php on line 10.
Line 10 is: $GLOBALS['y'] = $GLOBALS['x'] + $GLOBAL['y'];
I really can't see why it works on the w3schools editor but not on my browser. Other basic code works fine, WAMP works fine. I have PHP Version 5.6.19 and the tutorial is also PHP5 w3schools code
<!DOCTYPE html>
<html>
    <body>
        <?php
            $x = 5;
            $y = 10;
            function myTest() {
                $GLOBALS['y'] = $GLOBALS['x'] + $GLOBAL['y'];
            } 
            myTest();
            echo $y; // outputs 15
        ?> 
    </body>
</html>
 
    