3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Some {} function f ($one, Some $two, $thee = null) { echo $one; } $n = null; f('foo', $n);
based on vHGQA
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 2 passed to f() must be an instance of Some, null given, called in /in/or8Vp on line 12 and defined in /in/or8Vp:5 Stack trace: #0 /in/or8Vp(12): f('foo', NULL) #1 {main} thrown in /in/or8Vp on line 5
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Catchable fatal error: Argument 2 passed to f() must be an instance of Some, null given, called in /in/or8Vp on line 12 and defined in /in/or8Vp on line 5
Process exited with code 255.