3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function autoload($class) { throw new Exception('fail'); } spl_autoload_register('autoload'); new Xxx();
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Exception: fail in /in/GWtNV:3 Stack trace: #0 [internal function]: autoload('Xxx') #1 /in/GWtNV(8): spl_autoload_call('Xxx') #2 {main} thrown in /in/GWtNV on line 3
Process exited with code 255.
Output for 5.3.0 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'fail' in /in/GWtNV:3 Stack trace: #0 [internal function]: autoload('Xxx') #1 /in/GWtNV(8): spl_autoload_call('Xxx') #2 {main} thrown in /in/GWtNV on line 3
Process exited with code 255.
Output for 5.1.0 - 5.2.17
Fatal error: Class 'Xxx' not found in /in/GWtNV on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function spl_autoload_register() in /in/GWtNV on line 6
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/GWtNV on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/GWtNV on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/GWtNV on line 3
Process exited with code 255.