3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass(); function test(array $arr) { var_dump($arr); } test($obj);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to test() must be of the type array, object given, called in /in/RoSkq on line 9 and defined in /in/RoSkq:5 Stack trace: #0 /in/RoSkq(9): test(Object(stdClass)) #1 {main} thrown in /in/RoSkq on line 5
Process exited with code 255.
Output for 5.4.10 - 5.6.28
Catchable fatal error: Argument 1 passed to test() must be of the type array, object given, called in /in/RoSkq on line 9 and defined in /in/RoSkq on line 5
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Catchable fatal error: Argument 1 passed to test() must be an array, object given, called in /in/RoSkq on line 9 and defined in /in/RoSkq on line 5
Process exited with code 255.