3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} $foo = new Foo(new Bar); var_export($foo);
Output for 7.1.0
Fatal error: Uncaught Error: Class 'Bar' not found in /in/GSPip:5 Stack trace: #0 {main} thrown in /in/GSPip on line 5
Process exited with code 255.
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.0.14
Foo::__set_state(array( ))
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Class undefined: Bar in /in/GSPip on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
class Foo { }
Output for 4.3.0 - 4.4.9
class foo { }