public function isCallable($c)
    {
        if (is_string($c)) {
            return false;
        }
        if (is_object($c) && is_callable($c)) {
            return true;
        }

        return is_array($c) && isset($c[0]) && is_object($c[0]) && is_callable($c);
    }
public function isCallable($c)
    {
        if (is_string($c)) {
            return false;
        }
        if (is_object($c) && is_callable($c)) {
            return true;
        }

        return is_array($c) && isset($c[0]) && is_object($c[0]) && is_callable($c);
    }
public function isCallable ( $ c ) { if ( is_string ( $ c ) ) { return false ; } if ( is_object ( $ c ) && is_callable ( $ c ) ) { return true ; } return is_array ( $ c ) && isset ( $ c [ 0 ] ) && is_object ( $ c [ 0 ] ) && is_callable ( $ c ) ; }
Check whether or not a callable is acceptable.

We don't accept ['class', 'method'] style callbacks,
as they often contain user input and arrays of strings
are easy to sneak in.

@param callable $c The callable to check.
@return bool Valid callable.
Check whether or not a callable is acceptable .