3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function callMe(callable $fun) { $fun(); } callMe(function() { echo "yay"; }); callMe('lolno');
based on uGX83
Output for 7.0.0 - 7.2.0
yay Fatal error: Uncaught TypeError: Argument 1 passed to callMe() must be callable, string given, called in /in/RtT9Y on line 6 and defined in /in/RtT9Y:3 Stack trace: #0 /in/RtT9Y(6): callMe('lolno') #1 {main} thrown in /in/RtT9Y on line 3
Process exited with code 255.
Output for 5.4.9 - 5.6.28
yay Catchable fatal error: Argument 1 passed to callMe() must be callable, string given, called in /in/RtT9Y on line 6 and defined in /in/RtT9Y on line 3
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Catchable fatal error: Argument 1 passed to callMe() must be an instance of callable, instance of Closure given, called in /in/RtT9Y on line 5 and defined in /in/RtT9Y on line 3
Process exited with code 255.