3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function __autoload($class_name) { var_dump($class_name); } $a = new FOO(); $c = 'BAR'; $b = new $c();
Output for 7.2.0 - 7.2.12
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /in/Ke3qS on line 3 string(3) "FOO" Fatal error: Uncaught Error: Class 'FOO' not found in /in/Ke3qS:7 Stack trace: #0 {main} thrown in /in/Ke3qS on line 7
Process exited with code 255.
Output for 7.0.0 - 7.1.24
string(3) "FOO" Fatal error: Uncaught Error: Class 'FOO' not found in /in/Ke3qS:7 Stack trace: #0 {main} thrown in /in/Ke3qS on line 7
Process exited with code 255.
Output for hhvm-3.22.0
string(3) "FOO" Fatal error: Uncaught Error: Class undefined: FOO in /in/Ke3qS:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
string(3) "FOO" Fatal error: Uncaught Error: Class undefined: FOO in /in/Ke3qS:7 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1
string(3) "FOO" Fatal error: Class undefined: FOO in /in/Ke3qS on line 7
Process exited with code 255.
Output for 5.0.0 - 5.6.38
string(3) "FOO" Fatal error: Class 'FOO' not found in /in/Ke3qS on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: foo in /in/Ke3qS on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: foo in /in/Ke3qS on line 7