<?php
// Everything you enter here will be executed by our servers. Try it!
function test(callable $f)
{
return $f();
}
test(function() {
echo "asdf";
return 3;
});
Catchable fatal error: Argument 1 passed to test() must be an instance of callable, instance of Closure given, called in /in/KCQf9 on line 11 and defined in /in/KCQf9 on line 3
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/KCQf9 on line 8
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/KCQf9 on line 8
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/KCQf9 on line 3
Process exited with code 255.