How can late static binding in PHP 5.3 be utilized to handle class-specific constants?

Late static binding in PHP 5.3 allows us to access class-specific constants in child classes without the need to explicitly reference the parent class. This can be useful when dealing with constants that are unique to each class in an inheritance hierarchy.

class ParentClass {
    const PARENT_CONSTANT = 'Parent Constant';
    
    public static function getParentConstant() {
        return static::PARENT_CONSTANT;
    }
}

class ChildClass extends ParentClass {
    const CHILD_CONSTANT = 'Child Constant';
    
    public static function getChildConstant() {
        return static::CHILD_CONSTANT;
    }
}

echo ChildClass::getParentConstant(); // Output: Parent Constant
echo ChildClass::getChildConstant(); // Output: Child Constant