3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test {} function test (Test $test = null) {} test(false);
based on 8ehij
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of Test or null, boolean given, called in /in/OVXri on line 7 and defined in /in/OVXri:5 Stack trace: #0 /in/OVXri(7): test(false) #1 {main} thrown in /in/OVXri on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of Test, boolean given, called in /in/OVXri on line 7 and defined in /in/OVXri:5 Stack trace: #0 /in/OVXri(7): test(false) #1 {main} thrown in /in/OVXri on line 5
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Catchable fatal error: Argument 1 passed to test() must be an instance of Test, boolean given, called in /in/OVXri on line 7 and defined in /in/OVXri on line 5
Process exited with code 255.