8 if (!function_exists(
'is_callable')) {
9 function is_callable($var, $syntax_only=
false)
21 return (is_string($var) || (is_array($var) && count($var) == 2 && is_string(end($var)) && (is_string(reset($var)) || is_object(reset($var)))));
27 return function_exists($var);
29 else if (is_array($var) && count($var) == 2 && is_string($method = end($var)))
34 $methods = get_class_methods($obj);
35 return (
bool)(is_array($methods) && in_array(strtolower($method), $methods));
37 else if (is_object($obj))
39 return method_exists($obj, $method);