3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Dummy { public function __construct(\DateTime $d) { } } try { new Dummy(null); } catch (\Error $e) { echo "catched"; }
based on Bv5c4
Output for 7.0.0 - 7.2.0
catched
Output for 5.3.22 - 5.6.28
Catchable fatal error: Argument 1 passed to Dummy::__construct() must be an instance of DateTime, null given, called in /in/0FucK on line 10 and defined in /in/0FucK on line 4
Process exited with code 255.