Use is_callable to determine whether a given variable is a function. For example:
$func = function()
{
echo 'asdf';
};
if( is_callable( $func ) )
{
// Will be true.
}
Use is_callable to determine whether a given variable is a function. For example:
$func = function()
{
echo 'asdf';
};
if( is_callable( $func ) )
{
// Will be true.
}