3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { } function baz(stdClass $bar) { } $bar = new foo; baz($bar);
Output for 7.0.0 - 7.3.0rc3
Fatal error: Uncaught TypeError: Argument 1 passed to baz() must be an instance of stdClass, instance of foo given, called in /in/tjNea on line 13 and defined in /in/tjNea:7 Stack trace: #0 /in/tjNea(13): baz(Object(foo)) #1 {main} thrown in /in/tjNea on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught TypeError: Argument 1 passed to baz() must be an instance of stdClass, foo given in /in/tjNea:9 Stack trace: #0 /in/tjNea(13): baz() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Catchable fatal error: Argument 1 passed to baz() must be an instance of stdClass, instance of foo given, called in /in/tjNea on line 13 and defined in /in/tjNea on line 7
Process exited with code 255.