3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function aaa(object $b) { echo $b; } $c = new StdClass(); aaa($c);
based on Gcrrf
Output for 7.2.0
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/6Ksmg on line 3
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Fatal error: Uncaught TypeError: Argument 1 passed to aaa() must be an instance of object, instance of stdClass given, called in /in/6Ksmg on line 7 and defined in /in/6Ksmg:2 Stack trace: #0 /in/6Ksmg(7): aaa(Object(stdClass)) #1 {main} thrown in /in/6Ksmg on line 2
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Catchable fatal error: Argument 1 passed to aaa() must be an instance of object, instance of stdClass given, called in /in/6Ksmg on line 7 and defined in /in/6Ksmg on line 2
Process exited with code 255.