3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function b($t, $m) { echo __FUNCTION__, $m, "\n"; } set_error_handler(function ($t, $m) { echo __FUNCTION__, $m, "\n"; } E_USER_WARNING); set_error_handler('b', 0); trigger_error('foo'); restore_error_handler(); trigger_error('bar');
based on Zfq36
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'E_USER_WARNING' (T_STRING), expecting ',' or ')' in /in/t4huc on line 13
Process exited with code 255.
Output for 5.4.11 - 5.6.17
Parse error: syntax error, unexpected 'E_USER_WARNING' (T_STRING) in /in/t4huc on line 13
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/t4huc on line 13
Process exited with code 255.