I am looking for a way to test if a variable is an anonymous function/callback. Using the PHP.net example:
$greet = function($name)
{
printf("Hello %s\r\n", $name);
};
You could call it with:
$greet('hi');
But what if $greet could be some other variable type and you only want to execute the callback if it's set to a function? Something like:
is_func($greet);
is_callback($greet);
is_callable($greet);
Am I missing something in the documentation?