Vidyalelo
PHP · Q24

Object Oriented Concept

Programming · PHP · question 24

Q24

Which one of the following is a constant variable?

A.
const $name
B.
const $NAME
C.
constant NAME
D.
const NAME
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
Constants are not prefixed with a dollar sign like regular properties. By convention, they are often named using only uppercase characters