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
27
27
. Fixed bug #78916 (php-fpm 7.4.0 don't send mail via mail()).
28
28
(Jakub Zelenka)
29
29
30
+ - Intl:
31
+ . Implemented FR #78912 (INTL Support for accounting format). (cmb)
32
+
30
33
- Mysqlnd:
31
34
. Fixed bug #78823 (ZLIB_LIBS not added to EXTRA_LIBS). (Arjen de Korte)
32
35
Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ void formatter_register_constants( INIT_FUNC_ARGS )
51
51
FORMATTER_EXPOSE_CLASS_CONST ( DURATION );
52
52
FORMATTER_EXPOSE_CLASS_CONST ( PATTERN_RULEBASED );
53
53
FORMATTER_EXPOSE_CLASS_CONST ( IGNORE );
54
-
54
+ #if U_ICU_VERSION_MAJOR_NUM >= 53
55
+ FORMATTER_EXPOSE_CLASS_CONST ( CURRENCY_ACCOUNTING );
56
+ #endif
55
57
FORMATTER_EXPOSE_CUSTOM_CLASS_CONST ( "DEFAULT_STYLE" , UNUM_DEFAULT );
56
58
57
59
/* 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