I am working on a project, in which I am using a deprecated function from the older version. But don\'t want my script to stop if used in the older version.
So I am check
One more different:
If you have a class which uses __call magic method, the is_callable($object, $method)
will always return true for anything because __call
basically accepts every method name. And as you might already know, method_exists
will return false for this if the method is not defined in the class.
This is especially annoying if you use CakePHP Model
class as they implemented __call
magic method to provide magic queries, but not cool if you want the method to be absolutely defined.