3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class _google{} function __autoload($c){eval("class _$c{}");echo strlen($c);} function g($x){eval("new $x;");} g('bing'); g('google');
based on hGVdt
Output for 7.2.0
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /in/rUvk0 on line 4 4 Fatal error: Uncaught Error: Class 'bing' not found in /in/rUvk0(5) : eval()'d code:1 Stack trace: #0 /in/rUvk0(5): eval() #1 /in/rUvk0(7): g('bing') #2 {main} thrown in /in/rUvk0(5) : eval()'d code on line 1
Process exited with code 255.
Output for 7.0.0 - 7.1.10
4 Fatal error: Uncaught Error: Class 'bing' not found in /in/rUvk0(5) : eval()'d code:1 Stack trace: #0 /in/rUvk0(5): eval() #1 /in/rUvk0(7): g('bing') #2 {main} thrown in /in/rUvk0(5) : eval()'d code on line 1
Process exited with code 255.
Output for 5.3.18 - 5.6.28
4 Fatal error: Class 'bing' not found in /in/rUvk0(5) : eval()'d code on line 1
Process exited with code 255.