1.

Which feature allows us to call more than one method or function of the class in single instruction?(a) Typecasting(b) Method Including(c) Method adding(d) Method chainingThis question was posed to me during an interview.Question is from Advanced Object-Oriented PHP topic in division Object-Oriented PHP of PHP

Answer»

Right option is (d) Method chaining

To elaborate: When MANY METHODS are called in a single INSTRUCTION in PHP, it is called method chaining. FOLLOWING is a basic example of method chaining in php:



Discussion

No Comment Found

Related InterviewSolutions