function_exists() && method_exists()

//Detect function globally
function_exists($fun_name);

//Detect function in same object or class
method_exists($this, $fun_name);