3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { class A extends B {} } catch (\Throwable $e) { echo $e->getMessage(); }
Output for 7.3.0
Class 'B' not found
Output for 5.3.0 - 5.6.38, 7.0.0 - 7.2.13
Fatal error: Class 'B' not found in /in/6lK7J on line 4
Process exited with code 255.
Output for hhvm-3.20.2 - 3.22.0
unknown class B
Output for hhvm-3.11.1 - 3.19.2
Fatal error: Uncaught Error: unknown class B in /in/6lK7J:4 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
Fatal error: unknown class B in /in/6lK7J on line 4
Process exited with code 255.
Output for 5.0.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/6lK7J on line 5 Fatal error: Class 'B' not found in /in/6lK7J on line 4
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '{' in /in/6lK7J 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 '{' in /in/6lK7J on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/6lK7J on line 3
Process exited with code 255.