diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c index 98d767c465ac7..2c70f10fabfc7 100644 --- a/ext/intl/formatter/formatter.c +++ b/ext/intl/formatter/formatter.c @@ -49,7 +49,9 @@ void formatter_register_constants( INIT_FUNC_ARGS ) FORMATTER_EXPOSE_CLASS_CONST( DURATION ); FORMATTER_EXPOSE_CLASS_CONST( PATTERN_RULEBASED ); FORMATTER_EXPOSE_CLASS_CONST( IGNORE ); - +#if U_ICU_VERSION_MAJOR_NUM >= 53 + FORMATTER_EXPOSE_CLASS_CONST( CURRENCY_ACCOUNTING ); +#endif FORMATTER_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_STYLE", UNUM_DEFAULT ); /* UNumberFormatRoundingMode */ diff --git a/ext/intl/tests/bug78912.phpt b/ext/intl/tests/bug78912.phpt new file mode 100644 index 0000000000000..69d370ae0fff1 --- /dev/null +++ b/ext/intl/tests/bug78912.phpt @@ -0,0 +1,14 @@ +--TEST-- +Request #78912 (INTL Support for accounting format) +--SKIPIF-- += 53.0'); +?> +--FILE-- +formatCurrency(-12345.67, 'USD')); +?> +--EXPECT-- +string(12) "($12,345.67)"