3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = null; function test(array $test) { return $test; } echo test($test);
based on p7IAa
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/YDfNa on line 9 and defined in /in/YDfNa:5 Stack trace: #0 /in/YDfNa(9): test(NULL) #1 {main} thrown in /in/YDfNa on line 5
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Catchable fatal error: Argument 1 passed to test() must be of the type array, null given, called in /in/YDfNa on line 9 and defined in /in/YDfNa on line 5
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Catchable fatal error: Argument 1 passed to test() must be an array, null given, called in /in/YDfNa on line 9 and defined in /in/YDfNa on line 5
Process exited with code 255.