Home
last modified time | relevance | path

Searched refs:NumberFormatter (Results 1 – 25 of 47) sorted by relevance

12

/PHP-8.1/ext/intl/tests/
H A Dformatter_format_and_parse_errors.phpt8 $o = new NumberFormatter('en_US', NumberFormatter::PATTERN_DECIMAL);
34 /* With NumberFormatter::TYPE_CURRENCY */
36 numfmt_format($o, $num, NumberFormatter::TYPE_CURRENCY);
41 $o->format($num, NumberFormatter::TYPE_CURRENCY);
46 numfmt_parse($o, $str, NumberFormatter::TYPE_CURRENCY);
51 $o->parse($str, NumberFormatter::TYPE_CURRENCY);
59 NumberFormatter::format(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant
60 numfmt_parse(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant
61 NumberFormatter::parse(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant
63 NumberFormatter::format(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, u…
[all …]
H A Dformatter_get_set_symbol2.phpt19 …'DECIMAL_SEPARATOR_SYMBOL' => array( NumberFormatter::DECIMAL_SEPARATOR_SYMBOL, '_._', 12345.12345…
22 …'PERCENT_SYMBOL' => array( NumberFormatter::PERCENT_SYMBOL, '_%_', 12345.123456, NumberFormatter::…
23 …'ZERO_DIGIT_SYMBOL' => array( NumberFormatter::ZERO_DIGIT_SYMBOL, '_ZD_', 12345.123456, NumberForm…
24 …'DIGIT_SYMBOL' => array( NumberFormatter::DIGIT_SYMBOL, '_DS_', 12345.123456, NumberFormatter::DEC…
25 …'MINUS_SIGN_SYMBOL' => array( NumberFormatter::MINUS_SIGN_SYMBOL, '_-_', -12345.123456, NumberForm…
26 …'PLUS_SIGN_SYMBOL' => array( NumberFormatter::PLUS_SIGN_SYMBOL, '_+_', 12345.123456, NumberFormatt…
27 …'CURRENCY_SYMBOL' => array( NumberFormatter::CURRENCY_SYMBOL, '_$_', 12345.123456, NumberFormatter
31 …'PERMILL_SYMBOL' => array( NumberFormatter::PERMILL_SYMBOL, '_PS_', 12345.123456, NumberFormatter:…
32 …'PAD_ESCAPE_SYMBOL' => array( NumberFormatter::PAD_ESCAPE_SYMBOL, '_PE_', 12345.123456, NumberForm…
33 …'INFINITY_SYMBOL' => array( NumberFormatter::INFINITY_SYMBOL, '_IS_', 12345.123456, NumberFormatte…
[all …]
H A Dbug59597_32.phpt2 Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
10 $formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
11 $value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
14 $formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
15 $value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
H A Dbug59597_64.phpt2 Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
10 $formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
11 $value = $formatter->parse('2147483647', \NumberFormatter::TYPE_INT32);
14 $formatter = new \NumberFormatter('en', \NumberFormatter::DECIMAL);
15 $value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
H A Dbug48227.phpt2 Bug #48227 (NumberFormatter::format leaks memory)
8 $x = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
19 NumberFormatter::format(): Argument #1 ($num) must be of type int|float, string given
22 Deprecated: NumberFormatter::format(): Passing null to parameter #1 ($num) of type int|float is dep…
24 NumberFormatter::format(): Argument #1 ($num) must be of type int|float, NumberFormatter given
H A Dbug53735.phpt2 Bug #53735 NumberFormatter returns NaN when converting float point
10 $fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY);
18 $fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL);
21 $f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%');
H A Dformatter_format2.phpt22 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
23 NumberFormatter::DECIMAL => '',
24 NumberFormatter::CURRENCY => '',
25 NumberFormatter::PERCENT => '',
26 NumberFormatter::SCIENTIFIC => '',
27 NumberFormatter::SPELLOUT => '@@@@@@@',
28 NumberFormatter::ORDINAL => '',
29 NumberFormatter::DURATION => '',
30 NumberFormatter::PATTERN_RULEBASED => '#####.###',
35 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_format4.phpt23 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
24 NumberFormatter::DECIMAL => '',
25 NumberFormatter::CURRENCY => '',
26 NumberFormatter::PERCENT => '',
27 NumberFormatter::SCIENTIFIC => '',
28 NumberFormatter::SPELLOUT => '@@@@@@@',
29 NumberFormatter::ORDINAL => '',
30 NumberFormatter::DURATION => '',
31 NumberFormatter::PATTERN_RULEBASED => '#####.###',
36 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_format5.phpt23 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
24 NumberFormatter::DECIMAL => '',
25 NumberFormatter::CURRENCY => '',
26 NumberFormatter::PERCENT => '',
27 NumberFormatter::SCIENTIFIC => '',
28 NumberFormatter::SPELLOUT => '@@@@@@@',
29 NumberFormatter::ORDINAL => '',
30 NumberFormatter::DURATION => '',
31 NumberFormatter::PATTERN_RULEBASED => '#####.###',
36 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_format6.phpt23 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
24 NumberFormatter::DECIMAL => '',
25 NumberFormatter::CURRENCY => '',
26 NumberFormatter::PERCENT => '',
27 NumberFormatter::SCIENTIFIC => '',
28 NumberFormatter::SPELLOUT => '@@@@@@@',
29 NumberFormatter::ORDINAL => '',
30 NumberFormatter::DURATION => '',
31 NumberFormatter::PATTERN_RULEBASED => '#####.###',
36 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_format3.phpt23 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
24 NumberFormatter::DECIMAL => '',
25 NumberFormatter::CURRENCY => '',
26 NumberFormatter::PERCENT => '',
27 NumberFormatter::SCIENTIFIC => '',
28 NumberFormatter::SPELLOUT => '@@@@@@@',
29 NumberFormatter::ORDINAL => '',
30 NumberFormatter::DURATION => '',
31 NumberFormatter::PATTERN_RULEBASED => '#####.###',
36 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_get_set_text_attribute.phpt20 'POSITIVE_PREFIX' => array( NumberFormatter::POSITIVE_PREFIX, '_+_', 12345.1234 ),
21 'POSITIVE_SUFFIX' => array( NumberFormatter::POSITIVE_SUFFIX, '_+_', 12345.1234 ),
22 'NEGATIVE_PREFIX' => array( NumberFormatter::NEGATIVE_PREFIX, '_-_', -12345.1234 ),
23 'NEGATIVE_SUFFIX' => array( NumberFormatter::NEGATIVE_SUFFIX, '_-_', -12345.1234 ),
26 // 'CURRENCY_CODE' => array( NumberFormatter::CURRENCY_CODE, '_C_', 12345.1234 )
33 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
40 if( $attr == NumberFormatter::PADDING_CHARACTER )
41 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 );
68 if( $attr == NumberFormatter::PADDING_CHARACTER )
69 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 );
[all …]
H A Dformatter_get_set_text_attribute_var2.phpt20 'POSITIVE_PREFIX' => array( NumberFormatter::POSITIVE_PREFIX, '_+_', 12345.1234 ),
21 'POSITIVE_SUFFIX' => array( NumberFormatter::POSITIVE_SUFFIX, '_+_', 12345.1234 ),
22 'NEGATIVE_PREFIX' => array( NumberFormatter::NEGATIVE_PREFIX, '_-_', -12345.1234 ),
23 'NEGATIVE_SUFFIX' => array( NumberFormatter::NEGATIVE_SUFFIX, '_-_', -12345.1234 ),
26 // 'CURRENCY_CODE' => array( NumberFormatter::CURRENCY_CODE, '_C_', 12345.1234 )
33 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
40 if( $attr == NumberFormatter::PADDING_CHARACTER )
41 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 );
68 if( $attr == NumberFormatter::PADDING_CHARACTER )
69 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 );
[all …]
H A Dformatter_format7.phpt23 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
24 NumberFormatter::DECIMAL => '',
25 NumberFormatter::CURRENCY => '',
26 NumberFormatter::PERCENT => '',
27 NumberFormatter::SCIENTIFIC => '',
28 NumberFormatter::SPELLOUT => '@@@@@@@',
29 NumberFormatter::ORDINAL => '',
30 NumberFormatter::DURATION => '',
31 NumberFormatter::PATTERN_RULEBASED => '#####.###',
36 NumberFormatter::ORDINAL => '',
[all …]
H A Dformatter_format8.phpt22 NumberFormatter::PATTERN_DECIMAL => '##.#####################',
23 NumberFormatter::DECIMAL => '',
24 NumberFormatter::CURRENCY => '',
25 NumberFormatter::PERCENT => '',
26 NumberFormatter::SCIENTIFIC => '',
27 NumberFormatter::SPELLOUT => '@@@@@@@',
28 NumberFormatter::ORDINAL => '',
29 NumberFormatter::DURATION => '',
30 NumberFormatter::PATTERN_RULEBASED => '#####.###',
35 NumberFormatter::ORDINAL => '',
[all …]
H A Dbug14562.phpt2 Bug #14562 NumberFormatter breaks when locale changes
12 $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL );
16 $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL );
H A Dbug74063.phpt2 Bug #74063 (NumberFormatter fails after retrieval from session)
7 $formatter = new NumberFormatter("en_GB", NumberFormatter::CURRENCY);
15 Serialization of 'NumberFormatter' is not allowed
H A Dformatter_fail.phpt23 return new NumberFormatter($l, $s);
31 return NumberFormatter::create($l, $s);
53 array("en_US", NumberFormatter::PATTERN_RULEBASED),
57 $fmt = new NumberFormatter();
71 $fmt = NumberFormatter::create();
78 $fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
80 $fmt->__construct('en_US', NumberFormatter::DECIMAL);
98 ArgumentCountError: NumberFormatter::__construct() expects at least 2 arguments, 0 given in %s on l…
104 ArgumentCountError: NumberFormatter::create() expects at least 2 arguments, 0 given in %s on line %d
107 Error: NumberFormatter object is already constructed in %s on line %d
[all …]
H A Dformatter_parse.phpt18 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
22 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
23 $res_str .= ut_nfmt_parse( $fmt, "1.23", NumberFormatter::TYPE_INT32 ) . "\n";
26 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
28 $res_str .= ut_nfmt_parse( $fmt, "0.123 here", NumberFormatter::TYPE_DOUBLE, $pos ) . "\n";
H A Dbug67052-win32.phpt2 Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
17 $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
H A Dbug81019.phpt2 Bug #81019: Unable to clone NumberFormatter after failed parse()
8 $fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
H A Dbug67052.phpt2 Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
22 $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
H A Dbug78912.phpt11 $nf = new NumberFormatter('en_US', NumberFormatter::CURRENCY_ACCOUNTING);
/PHP-8.1/ext/intl/formatter/
H A Dformatter_functions_arginfo.h10 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
16 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
23 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
29 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
36 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
42 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
47 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
53 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
62 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
67 ZEND_ARG_OBJ_INFO(0, fmt, NumberFormatter, 0)
[all …]
H A Dformatter.stub.php6 class NumberFormatter class
14 …ic static function create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}
20 … public function format(int|float $num, int $type = NumberFormatter::TYPE_DEFAULT): string|false {}
27 …public function parse(string $string, int $type = NumberFormatter::TYPE_DOUBLE, &$offset = null): …

Completed in 21 milliseconds

12