3v4l.org

run code in 200+ php & hhvm versions
<?php new Foo; if (true) { class Foo{} }
Output for 7.0.28 - 7.3.1
Fatal error: Uncaught Error: Class 'Foo' not found in /in/Xi4qg:3 Stack trace: #0 {main} thrown in /in/Xi4qg on line 3
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Class undefined: Foo in /in/Xi4qg:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Fatal error: Uncaught Error: Class undefined: Foo in /in/Xi4qg:3 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Fatal error: Class 'Foo' not found in /in/Xi4qg on line 3
Process exited with code 255.