Symfony\Component\Intl\NumberFormatter\NumberFormatter::roundCurrency
Rounds a currency value, applying increment rounding if applicable
When a currency have a rounding increment, an extra round is made after the first one. The rounding factor is determined in the ICU data and is explained as of: "the rounding increment is given in units of 10^(-fraction_digits)" The only actual rounding data as of this writing, is CHF.
Signature
private function roundCurrency(float
$value,
string
$currency )
Parameters
$value
— float- The numeric currency value
$currency
— string- The 3-letter ISO 4217 currency code indicating the currency to use
Returns
- string
- The rounded numeric currency value