<?global $a;$a="yes"; function test(){ global $b; $b="ok"; echo $b.$a."\n";}; test();echo $b.$a."\n";?>
Standard input is empty
ok okyes
PHP Notice: Undefined variable: a in /home/KnYuPk/prog.php on line 8
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!