3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function my_function(callable $a) { $a('hello'); } my_function('var_dump');
based on ci8o9
Output for 5.4.9 - 7.2.0
string(5) "hello"
Output for 5.3.19 - 5.3.29
Catchable fatal error: Argument 1 passed to my_function() must be an instance of callable, string given, called in /in/dMsnv on line 7 and defined in /in/dMsnv on line 3
Process exited with code 255.