Vidyalelo
PHP · Q23

Object Oriented Concept

Programming · PHP · question 23

Q23

Which keyword is used to declare a constant property?

A.
const
Answer
B.
con
C.
constant
D.
_constant

Answer: Option A

Solution

Answer: Option A
Solution:
A constant property is declared with the const keyword. Like global constants, class constants cannot be changed once they are set.