PHP NumberFormatter and Currency, can't set precision
问题 I want to set a precision of 0 when using the NumberFormatter PHP class (from Intl extension) with currency. However I've got some strange result. Here: $numberFormatter = new NumberFormatter('en-US', NumberFormatter::CURRENCY); $numberFormatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 0); echo $numberFormatter->formatCurrency('45', 'USD'); It outputs $45 , which is what I want. However, if I change the currency to EUR with the same settings: echo $numberFormatter->formatCurrency('45',