Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which one of the following is the right way to call a class constant, given that the class is mathFunction?

a) echo PI;
b) echo mathFunction->PI;
c) echo mathFunction::PI;
d) echo mathFunction=PI;

Answer: c
Explanation: The Scope Resolution Operator “::” is a token that allows access to static, constant, and overridden properties or methods of a class.

Join The Discussion