Possible Duplicate:
PHP __call vs method_exists
I’m using __call() instead of methods in a class. Is there any way to influence the result of method_exists() in this class?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t.
__call is just a ‘placeholder’ for a function call on a class.
Consider this:
This code will output ‘Bar’
The method ‘Foo’ does not exists, and by calling $MyClass->Foo(‘Foo’) __call kicks in.
Obviously, method_exists has no way of knowing what __call wil handle.