3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class a { public function checkDateTime(DateTime $dateTime) { echo 'done'; $dateTime->getTimestamp(); } } class c { public static function checkTimingCondition(a $a, DateTime $dateTime) { return $a->checkDateTime($dateTime); } } class h { public function handle() { echo c::checkTimingCondition(null, null); } } $h = new h; $h->handle(null);
based on QICS0
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to c::checkTimingCondition() must be an instance of a, null given, called in /in/1VSLO on line 24 and defined in /in/1VSLO:14 Stack trace: #0 /in/1VSLO(24): c::checkTimingCondition(NULL, NULL) #1 /in/1VSLO(30): h->handle(NULL) #2 {main} thrown in /in/1VSLO on line 14
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 1 passed to c::checkTimingCondition() must be an instance of a, null given, called in /in/1VSLO on line 24 and defined in /in/1VSLO on line 14
Process exited with code 255.