3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function f(array $a) { var_dump($a); } f(array(5)); f(3);
Output for 7.0.0 - 7.2.0
array(1) { [0]=> int(5) } Fatal error: Uncaught TypeError: Argument 1 passed to f() must be of the type array, integer given, called in /in/NAEhv on line 8 and defined in /in/NAEhv:3 Stack trace: #0 /in/NAEhv(8): f(3) #1 {main} thrown in /in/NAEhv on line 3
Process exited with code 255.
Output for 5.4.9 - 5.6.28
array(1) { [0]=> int(5) } Catchable fatal error: Argument 1 passed to f() must be of the type array, integer given, called in /in/NAEhv on line 8 and defined in /in/NAEhv on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
array(1) { [0]=> int(5) } Catchable fatal error: Argument 1 passed to f() must be an array, integer given, called in /in/NAEhv on line 8 and defined in /in/NAEhv on line 3
Process exited with code 255.