Providing a callee response to a “call to undefined method” error? [duplicate]
This question already has an answer here:
I’m learning my way into some more advanced programming with PHP.
I’ve seen that calling an non-existent method produces “call to undefined method” error.
PHP being quite flexible is there a technique that allows to intercept this error ? If so, how is this usually done ?
Edit: To clarify, I want to actually do something when the error occurs like send a reply back, not necessarily prevent it. Forget to mention that this is in the context of a class. Of course, methods only apply in the context of a class 😉