3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = function (ArrayObject $array) {}; $a([]);
based on cqDo0
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be an instance of ArrayObject, array given, called in /in/0VLD6 on line 5 and defined in /in/0VLD6:3 Stack trace: #0 /in/0VLD6(5): {closure}(Array) #1 {main} thrown in /in/0VLD6 on line 3
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Catchable fatal error: Argument 1 passed to {closure}() must be an instance of ArrayObject, array given, called in /in/0VLD6 on line 5 and defined in /in/0VLD6 on line 3
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/0VLD6 on line 5
Process exited with code 255.