src/Utilities/Reflection.php
public static function getConstantValue($class, $constant)
    {
        $reflection = new \ReflectionClass($class);

        if (self::hasConstant($class, $constant)) {
            return $reflection->getConstant($constant);
        }

        return null;
    }
public static function getConstantValue($class, $constant)
    {
        $reflection = new \ReflectionClass($class);

        if (self::hasConstant($class, $constant)) {
            return $reflection->getConstant($constant);
        }

        return null;
    }
public static function getConstantValue ( $ class , $ constant ) { $ reflection = new \ ReflectionClass ( $ class ) ; if ( self :: hasConstant ( $ class , $ constant ) ) { return $ reflection -> getConstant ( $ constant ) ; } return null ; }
Returns value of given constant

@param object|string $class    The object or name of object's class
@param string        $constant Name of the constant that contains a value
@return mixed
Returns value of given constant