PHP OOP - Class Constants
PHP - Class Constants
Class constants can be useful if you need to define some constant data within a class. Constants cannot be changed once it is declared.
A class constant is declared inside a class with the const keyword. It is case-sensitive.
Example - class constants
Access a constant from inside the class by using the self keyword followed by (::) followed by the constant name, like here: