In PHP you can detect when a method is called even when it doesn\'t exist using the \"magic\" __call function.
__call
public function __call($methodNam
Obsolete since Gecko 43 (Firefox 43 / Thunderbird 43 / SeaMonkey 2.40)
You can use __noSuchMethod__ in Firefox. Unfortunately it is non standard...
Related question : Is there an equivalent of the __noSuchMethod__ feature for properties, or a way to implement it in JS?