3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $f = function(Callable $callback){}; $f(['stdClass', '__toString']);
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be callable, array given, called in /in/5MoAe on line 4 and defined in /in/5MoAe:2 Stack trace: #0 /in/5MoAe(4): {closure}(Array) #1 {main} thrown in /in/5MoAe on line 2
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Catchable fatal error: Argument 1 passed to {closure}() must be callable, array given, called in /in/5MoAe on line 4 and defined in /in/5MoAe on line 2
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/5MoAe on line 4
Process exited with code 255.