File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ PHP NEWS
2727 . Fixed bug #78916 (php-fpm 7.4.0 don't send mail via mail()).
2828 (Jakub Zelenka)
2929
30+ - Intl:
31+ . Implemented FR #78912 (INTL Support for accounting format). (cmb)
32+
3033- Mysqlnd:
3134 . Fixed bug #78823 (ZLIB_LIBS not added to EXTRA_LIBS). (Arjen de Korte)
3235
Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ void formatter_register_constants( INIT_FUNC_ARGS )
5151 FORMATTER_EXPOSE_CLASS_CONST ( DURATION );
5252 FORMATTER_EXPOSE_CLASS_CONST ( PATTERN_RULEBASED );
5353 FORMATTER_EXPOSE_CLASS_CONST ( IGNORE );
54-
54+ #if U_ICU_VERSION_MAJOR_NUM >= 53
55+ FORMATTER_EXPOSE_CLASS_CONST ( CURRENCY_ACCOUNTING );
56+ #endif
5557 FORMATTER_EXPOSE_CUSTOM_CLASS_CONST ( "DEFAULT_STYLE" , UNUM_DEFAULT );
5658
5759 /* UNumberFormatRoundingMode */
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Request #78912 (INTL Support for accounting format)
3+ --SKIPIF--
4+ <?php
5+ if (!extension_loaded ('intl ' )) die ('skip intl extension not available ' );
6+ if (version_compare (INTL_ICU_VERSION , '53.0 ' ) < 0 ) die ('skip for ICU >= 53.0 ' );
7+ ?>
8+ --FILE--
9+ <?php
10+ $ nf = new NumberFormatter ('en_US ' , NumberFormatter::CURRENCY_ACCOUNTING );
11+ var_dump ($ nf ->formatCurrency (-12345.67 , 'USD ' ));
12+ ?>
13+ --EXPECT--
14+ string(12) "($12,345.67)"
You can’t perform that action at this time.
0 commit comments