1.

Which one of the following method is invoked when an undefined method is called by client code?(a) __get()(b) __isset()(c) __unset()(d) __call()The question was asked during a job interview.This question is from Object Advanced Features in section Objects and Databases in PHP of PHP

Answer»

The correct option is (d) __call()

Explanation: The __call() METHOD is probably the most USEFUL of all the INTERCEPTOR methods. The __call() method can be useful for delegation. Delegation is the mechanism by which one object PASSES method invocations on to a second.



Discussion

No Comment Found

Related InterviewSolutions