3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "test!"; $b = "test B!"; function errhnd($a=$GLOBALS['a'], $b=$GLOBALS['b'], $errno, $errstr, $errfile, $errline) { # need $a and $b vars here! echo $a; echo "\n"; echo $b; echo "\n"; echo $errno; echo "\n"; echo $errstr; echo "\n"; echo $errfile; } set_error_handler('errhnd'); fuidaa;
Output for hhvm-3.10.0 - 3.12.0
8 Use of undefined constant fuidaa - assumed 'fuidaa' /in/Yi7Qh 21 Notice: Array to string conversion in /in/Yi7Qh on line 16 Array
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$GLOBALS' (T_VARIABLE) in /in/Yi7Qh on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/Yi7Qh on line 6
Process exited with code 255.