1.

Which method is used to tweak an object’s cloning behavior?(a) clone()(b) __clone()(c) _clone(d) object_clone()This question was posed to me in unit test.Question is taken from Advanced Object-Oriented PHP in chapter Object-Oriented PHP of PHP

Answer»

Right CHOICE is (b) __clone()

EASIEST EXPLANATION: A COPY of an OBJECT is created by using the clone keyword, which calls the object’s __clone() method.



Discussion

No Comment Found

Related InterviewSolutions