3v4l.org

run code in 300+ PHP versions simultaneously
<?php eval(' class B extends A { } class A { } '); eval(' if (true) { class D extends C { } class C { } } ');
Output for 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
Fatal error: Uncaught Error: Class "C" not found in /in/ZAEq1(8) : eval()'d code:3 Stack trace: #0 /in/ZAEq1(8): eval() #1 {main} thrown in /in/ZAEq1(8) : eval()'d code on line 3
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.30
Fatal error: Uncaught Error: Class 'C' not found in /in/ZAEq1(8) : eval()'d code:3 Stack trace: #0 /in/ZAEq1(8): eval() #1 {main} thrown in /in/ZAEq1(8) : eval()'d code on line 3
Process exited with code 255.
Output for 7.1.4 - 7.1.21, 7.2.0 - 7.2.33
Fatal error: Class 'C' not found in /in/ZAEq1(8) : eval()'d code on line 3
Process exited with code 255.
Output for 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.

preferences:
59.69 ms | 413 KiB | 5 Q