1.

Which keyword is used to access a static method or property from within the same class(rather than from child)?(a) static(b) strat(c) self(d) setThis question was addressed to me in semester exam.I want to ask this question from Object Advanced Features topic in section Objects and Databases in PHP of PHP

Answer»

The correct CHOICE is (c) SELF

The EXPLANATION is: Self is to CLASSES what the $this pseudo-variable is to objects.



Discussion

No Comment Found

Related InterviewSolutions