Skip to content

Instantly share code, notes, and snippets.

@medeirosinacio
Last active June 24, 2021 23:22
Show Gist options
  • Save medeirosinacio/3fe4f8e8217a718e89ad5082c46bc744 to your computer and use it in GitHub Desktop.
Save medeirosinacio/3fe4f8e8217a718e89ad5082c46bc744 to your computer and use it in GitHub Desktop.
Checks if the class has been defined and Checks if the class method exists
/**
* Checks if the class has been defined and Checks if the class method exists
* @param $class_object
* @param $method_name
* @return bool
*/
function class_method_exists($class_object, $method_name)
{
return class_exists($class_object) && method_exists($class_object, $method_name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment