Examveda
Examveda

Which one of the following is the right way to define a constant?

A. constant PI = “3.1415”;

B. const $PI = “3.1415”;

C. constant PI = ‘3.1415’;

D. const PI = ‘3.1415’;

Answer: Option D

Solution(By Examveda Team)

Class constants are created like: const NAME = ‘VALUE’;

This Question Belongs to PHP >> Object Oriented Concept

Join The Discussion

Related Questions on Object Oriented Concept