1.

Which keyword is used to declare a constant property?(a) const(b) con(c) constant(d) _constantThe question was asked in an international level competition.My question comes from Object Advanced Features topic in chapter Objects and Databases in PHP of PHP

Answer»

Right option is (a) const

Easiest EXPLANATION: A constant PROPERTY is declared with the const KEYWORD. Like global constants, class constants cannot be CHANGED once they are set.



Discussion

No Comment Found

Related InterviewSolutions