What are the best practices for defining constants in PHP classes for easy access and readability?

When defining constants in PHP classes, it is important to follow best practices to ensure easy access and readability. One common approach is to use all uppercase letters for constant names to distinguish them from variables. Additionally, it is recommended to prefix constant names with the class name to prevent naming conflicts. Finally, constants should be declared as public and static to allow easy access from outside the class.

class MyClass {
    const MY_CONSTANT = 'value';

    public function getConstantValue() {
        return self::MY_CONSTANT;
    }
}