public static function toValue($constant)
    {
        if (false !== ($_index = array_search($constant, static::getDefinedConstants(true)))) {
            return $_index;
        }

        throw new \InvalidArgumentException('The constant "' . $constant . '" has no associated value.');
    }
public static function toValue($constant)
    {
        if (false !== ($_index = array_search($constant, static::getDefinedConstants(true)))) {
            return $_index;
        }

        throw new \InvalidArgumentException('The constant "' . $constant . '" has no associated value.');
    }
public static function toValue ( $ constant ) { if ( false !== ( $ _index = array_search ( $ constant , static :: getDefinedConstants ( true ) ) ) ) { return $ _index ; } throw new \ InvalidArgumentException ( 'The constant "' . $ constant . '" has no associated value.' ) ; }
Given a CONSTANT, return the associated VALUE

@param mixed $constant

@return string
Given a CONSTANT return the associated VALUE