3v4l.org

run code in 200+ php & hhvm versions
<?php eval(' class B extends A { } class A { } '); eval(' if (true) { class D extends C { } class C { } } ');
Output for 7.0.28 - 7.0.31, 7.1.4 - 7.2.9
Fatal error: Class 'C' not found in /in/ZAEq1(8) : eval()'d code on line 3
Process exited with code 255.
Output for 5.6.30, 7.1.0 - 7.1.3
Fatal error: Class 'C' not found in /in/ZAEq1(13) : eval()'d code on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: unknown class C in /in/ZAEq1(-1)(62ed6f5b40ce68e2fd09368639829ec4) : eval()'d code:-1 Stack trace: #0 /in/ZAEq1(-1): include() #1 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: unknown class C in /in/ZAEq1(13)(62ed6f5b40ce68e2fd09368639829ec4) : eval()'d code:3 Stack trace: #0 /in/ZAEq1(13): include() #1 {main}
Process exited with code 255.