3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = null; function test(array $test) { return $test; } echo test();
based on IKqVS
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function test(), 0 passed in /in/p7IAa on line 9 and exactly 1 expected in /in/p7IAa:5 Stack trace: #0 /in/p7IAa(9): test() #1 {main} thrown in /in/p7IAa 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 of the type array, none given, called in /in/p7IAa on line 9 and defined in /in/p7IAa:5 Stack trace: #0 /in/p7IAa(9): test() #1 {main} thrown in /in/p7IAa 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, none given, called in /in/p7IAa on line 9 and defined in /in/p7IAa 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, none given, called in /in/p7IAa on line 9 and defined in /in/p7IAa on line 5
Process exited with code 255.