src/Reflection/ReflectionClass.php
public function getConstant(string $name)
    {
        $reflectionConstant = $this->getReflectionConstant($name);

        if (! $reflectionConstant) {
            return null;
        }

        return $reflectionConstant->getValue();
    }
public function getConstant(string $name)
    {
        $reflectionConstant = $this->getReflectionConstant($name);

        if (! $reflectionConstant) {
            return null;
        }

        return $reflectionConstant->getValue();
    }
Get the value of the specified class constant.

Returns null if not specified.

@return mixed|null