public static function getConstantValuesByPrefix($className, $prefix)
    {
        $prefixLength = strlen($prefix);
        $result = [];

        $reflection = new \ReflectionClass($className);
        foreach ($reflection->getConstants() as $constKey => $constValue) {
            if ($prefix === substr($constKey, 0, $prefixLength)) {
                $result[] = $constValue;
            }
        }

        return $result;
    }
public static function getConstantValuesByPrefix($className, $prefix)
    {
        $prefixLength = strlen($prefix);
        $result = [];

        $reflection = new \ReflectionClass($className);
        foreach ($reflection->getConstants() as $constKey => $constValue) {
            if ($prefix === substr($constKey, 0, $prefixLength)) {
                $result[] = $constValue;
            }
        }

        return $result;
    }
public static function getConstantValuesByPrefix ( $ className , $ prefix ) { $ prefixLength = strlen ( $ prefix ) ; $ result = [ ] ; $ reflection = new \ ReflectionClass ( $ className ) ; foreach ( $ reflection -> getConstants ( ) as $ constKey => $ constValue ) { if ( $ prefix === substr ( $ constKey , 0 , $ prefixLength ) ) { $ result [ ] = $ constValue ; } } return $ result ; }
Get Contant Values By Prefix

@param string $className
@param string $prefix

@return array
Get Contant Values By Prefix