The best way, in my opinion, is to use the __call magic method.
public function __call($name, $arguments) { throw new Exception("Method {$name} is not supported."); }
Yes, you can use method_exists ($ this ...), but this is an internal PHP method.
source share