3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function b(DateTime $c) { print_r($c); } } $a = new A(); try { $a->b(""); } catch (TypeError $e) { echo "subidubi" . $e->getMessage(); }
based on QlpWm
Output for 7.0.0 - 7.2.0
subidubiArgument 1 passed to A::b() must be an instance of DateTime, string given, called in /in/3T2g7 on line 13
Output for 5.4.0 - 5.6.28
Catchable fatal error: Argument 1 passed to A::b() must be an instance of DateTime, string given, called in /in/3T2g7 on line 13 and defined in /in/3T2g7 on line 5
Process exited with code 255.