Home
last modified time | relevance | path

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

12

/php-src/ext/intl/tests/formatter/
H A Drounding_modes.phpt2 NumberFormatter: rounding modes
11 var_dump(NumberFormatter::ROUND_CEILING);
12 var_dump(NumberFormatter::ROUND_FLOOR);
13 var_dump(NumberFormatter::ROUND_DOWN);
15 var_dump(NumberFormatter::ROUND_UP);
17 var_dump(NumberFormatter::ROUND_HALFEVEN);
18 var_dump(NumberFormatter::ROUND_HALFODD);
19 var_dump(NumberFormatter::ROUND_HALFDOWN);
20 var_dump(NumberFormatter::ROUND_HALFUP);
22 var_dump(NumberFormatter::ROUND_DOWN === NumberFormatter::ROUND_TOWARD_ZERO);
[all …]
/php-src/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
67 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
8 $fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY);
16 $fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL);
19 $f = new NumberFormatter('hu_HU', NumberFormatter::PERCENT, '#,##0%');
H A Dformatter_format6.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 Ddeprecated_number_formater_type_currency.phpt2 NumberFormatter::TYPE_CURRENCY is deprecated
7 var_dump(NumberFormatter::TYPE_CURRENCY);
8 var_dump(constant('NumberFormatter::TYPE_CURRENCY'));
11 Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d
14 Deprecated: Constant NumberFormatter::TYPE_CURRENCY is deprecated since 8.3 in %s on line %d
H A Dformatter_get_set_text_attribute_var2.phpt18 'POSITIVE_PREFIX' => array( NumberFormatter::POSITIVE_PREFIX, '_+_', 12345.1234 ),
19 'POSITIVE_SUFFIX' => array( NumberFormatter::POSITIVE_SUFFIX, '_+_', 12345.1234 ),
20 'NEGATIVE_PREFIX' => array( NumberFormatter::NEGATIVE_PREFIX, '_-_', -12345.1234 ),
21 'NEGATIVE_SUFFIX' => array( NumberFormatter::NEGATIVE_SUFFIX, '_-_', -12345.1234 ),
24 // 'CURRENCY_CODE' => array( NumberFormatter::CURRENCY_CODE, '_C_', 12345.1234 )
31 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
38 if( $attr == NumberFormatter::PADDING_CHARACTER )
39 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 );
66 if( $attr == NumberFormatter::PADDING_CHARACTER )
67 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 );
[all …]
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);
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
122 ValueError: NumberFormatter::__construct(): Argument #1 ($locale) "%s" is invalid in %s on line %d
[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 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 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_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 Dgh12727.phpt9 new NumberFormatter('xx', NumberFormatter::DECIMAL);
15 NumberFormatter::__construct(): Argument #1 ($locale) "%s" is invalid
H A Dformatter_clone_bad_obj.phpt2 Cloning uninitialized NumberFormatter
8 class A extends NumberFormatter {
21 Error: Cannot clone uninitialized NumberFormatter
H A Dbug81019.phpt2 Bug #81019: Unable to clone NumberFormatter after failed parse()
8 $fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL);
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 Dbug67052.phpt2 Bug #67052 - NumberFormatter::parse() resets LC_NUMERIC setting
22 $fmt = new NumberFormatter( 'sl_SI.UTF-8', NumberFormatter::DECIMAL);
H A Dbug78912.phpt7 $nf = new NumberFormatter('en_US', NumberFormatter::CURRENCY_ACCOUNTING);
H A Dformatter_format_conv.phpt10 $fmt = ut_nfmt_create( 'en_US', NumberFormatter::DECIMAL );
13 $str_res = ut_nfmt_format ($fmt, $number, NumberFormatter::TYPE_INT32)."\n";
/php-src/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 …]
/php-src/ext/intl/
H A Dphp_intl.stub.php393 function numfmt_create(string $locale, int $style, ?string $pattern = null): ?NumberFormatter {}
395 function numfmt_format(NumberFormatter $formatter, int|float $num, int $type = NumberFormatter::TYP…
398 function numfmt_parse(NumberFormatter $formatter, string $string, int $type = NumberFormatter::TYPE…
410 function numfmt_get_attribute(NumberFormatter $formatter, int $attribute): int|float|false {}
414 function numfmt_get_text_attribute(NumberFormatter $formatter, int $attribute): string|false {}
416 function numfmt_set_symbol(NumberFormatter $formatter, int $symbol, string $value): bool {}
418 function numfmt_get_symbol(NumberFormatter $formatter, int $symbol): string|false {}
420 function numfmt_set_pattern(NumberFormatter $formatter, string $pattern): bool {}
422 function numfmt_get_pattern(NumberFormatter $formatter): string|false {}
426 function numfmt_get_error_code(NumberFormatter $formatter): int {}
[all …]

Completed in 43 milliseconds

12