3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function blah(object $arg1) { echo "Hello"; } blah(new DateTime());
based on V23nU
Output for 7.2.0
Hello
Output for 7.0.0 - 7.1.10
Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of object, instance of DateTime given, called in /in/s4Mol on line 8 and defined in /in/s4Mol:3 Stack trace: #0 /in/s4Mol(8): blah(Object(DateTime)) #1 {main} thrown in /in/s4Mol on line 3
Process exited with code 255.
Output for 5.3.17 - 5.6.28
Catchable fatal error: Argument 1 passed to blah() must be an instance of object, instance of DateTime given, called in /in/s4Mol on line 8 and defined in /in/s4Mol on line 3
Process exited with code 255.