library/Money/Currency.php
public static function getSubUnit($currencyCode)
    {
        $subunits = static::getCurrencyData($currencyCode)['sub_unit'];
        if (!is_int($subunits)) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be an integer; "%s" given',
                is_object($subunits) ? get_class($subunits) : gettype($subunits)
            ));
        }
        if ($subunits < 1) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be greater than 1; "%s" given',
                $subunits
            ));
        }
        return $subunits;
    }
public static function getSubUnit($currencyCode)
    {
        $subunits = static::getCurrencyData($currencyCode)['sub_unit'];
        if (!is_int($subunits)) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be an integer; "%s" given',
                is_object($subunits) ? get_class($subunits) : gettype($subunits)
            ));
        }
        if ($subunits < 1) {
            throw new UnexpectedValueException(sprintf(
                'The currency sub-units value must be greater than 1; "%s" given',
                $subunits
            ));
        }
        return $subunits;
    }
public static function getSubUnit ( $ currencyCode ) { $ subunits = static :: getCurrencyData ( $ currencyCode ) [ 'sub_unit' ] ; if ( ! is_int ( $ subunits ) ) { throw new UnexpectedValueException ( sprintf ( 'The currency sub-units value must be an integer; "%s" given' , is_object ( $ subunits ) ? get_class ( $ subunits ) : gettype ( $ subunits ) ) ) ; } if ( $ subunits < 1 ) { throw new UnexpectedValueException ( sprintf ( 'The currency sub-units value must be greater than 1; "%s" given' , $ subunits ) ) ; } return $ subunits ; }
Returns the sub-unit value

@param string $currencyCode The currency ISO 4217 alpha 3 code
@return integer
@throws UnexpectedValueException
@throws InvalidArgumentException
Returns the sub - unit value