3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php test(null); function test(array $a) { foreach ($a as $b) { } }
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be of the type array, null given, called in /in/K4RZa on line 3 and defined in /in/K4RZa:5 Stack trace: #0 /in/K4RZa(3): test(NULL) #1 {main} thrown in /in/K4RZa on line 5
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Catchable fatal error: Argument 1 passed to test() must be of the type array, null given, called in /in/K4RZa on line 3 and defined in /in/K4RZa on line 5
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Catchable fatal error: Argument 1 passed to test() must be an array, null given, called in /in/K4RZa on line 3 and defined in /in/K4RZa on line 5
Process exited with code 255.