inputs like "NaN €" are always considered invalid (and so returned as they are) because
a currency without a number can not exist
$fmt->format(NAN) (where $fmt is a \NumberFormatter intl instance) never returns an accordingly formatted string but only a (possibly localised) NaN value
handle infinity values
currency is mandatory: uncurrencying "∞ €" outputs double(INF) (i.e. filtered)
currency is NOT mandatory: uncurrencying "∞" outputs "∞" (i.e. not filtered)
Uncurrency
class should:double(NAN)
for input string representing values that are not a number, also if they are localised (e.g. "ليس رقم")"ليس رقم"
outputsdouble(NAN)
"NaN"
outputsdouble(NAN)
"NaN €"
are always considered invalid (and so returned as they are) because$fmt->format(NAN)
(where$fmt
is a\NumberFormatter
intl instance) never returns an accordingly formatted string but only a (possibly localised) NaN value"∞ €"
outputsdouble(INF)
(i.e. filtered)"∞"
outputs"∞"
(i.e. not filtered)