/php-src/ext/intl/tests/ |
H A D | ut_common.inc | 199 return $GLOBALS['oo-mode'] ? $fmt->getPattern() : numfmt_get_pattern( $fmt ); 207 return $GLOBALS['oo-mode'] ? $fmt->getErrorCode() : numfmt_get_error_code( $fmt ); 309 return $GLOBALS['oo-mode'] ? $fmt->format( $args ) : msgfmt_format( $fmt, $args); 313 return $GLOBALS['oo-mode'] ? $fmt->parse( $string) : msgfmt_parse( $fmt, $string); 329 return $GLOBALS['oo-mode'] ? $fmt->getPattern() : msgfmt_get_pattern( $fmt ); 333 return $GLOBALS['oo-mode'] ? $fmt->getLocale( ) : msgfmt_get_locale( $fmt ); 350 return $GLOBALS['oo-mode'] ? $fmt->getDateType( ) : datefmt_get_datetype( $fmt ); 354 return $GLOBALS['oo-mode'] ? $fmt->getTimeType( ) : datefmt_get_timetype( $fmt ); 358 return $GLOBALS['oo-mode'] ? $fmt->getCalendar( ) : datefmt_get_calendar( $fmt ); 374 return $GLOBALS['oo-mode'] ? $fmt->getPattern() : datefmt_get_pattern( $fmt ); [all …]
|
H A D | formatter_get_set_pattern2.phpt | 19 $fmt = ut_nfmt_create( "en_US", NumberFormatter::PATTERN_DECIMAL ); 22 $res_str .= "Default pattern: '" . ut_nfmt_get_pattern( $fmt ) . "'\n"; 26 $res = ut_nfmt_set_pattern( $fmt, "0.0" ); 28 … $res_str .= ut_nfmt_get_error_message( $fmt ) . " (" . ut_nfmt_get_error_code( $fmt ) . ")\n"; 31 $res = ut_nfmt_get_pattern( $fmt ); 33 … $res_str .= ut_nfmt_get_error_message( $fmt ) . " (" . ut_nfmt_get_error_code( $fmt ) . ")\n"; 34 $res_str .= "New pattern: '" . ut_nfmt_get_pattern( $fmt ) . "'\n"; 37 ut_nfmt_set_pattern($fmt, str_repeat('@', 200)); 38 $res_str .= "New pattern: '" . ut_nfmt_get_pattern( $fmt ) . "'\n"; 40 $res = ut_nfmt_set_pattern( $fmt, "0.0 .#.#.#"); [all …]
|
H A D | formatter_get_set_pattern.phpt | 19 $fmt = ut_nfmt_create( "en_US", NumberFormatter::PATTERN_DECIMAL ); 22 $res_str .= "Default pattern: '" . ut_nfmt_get_pattern( $fmt ) . "'\n"; 23 $res_str .= "Formatting result: " . ut_nfmt_format( $fmt, $test_value ) . "\n"; 26 $res = ut_nfmt_set_pattern( $fmt, "0.0" ); 28 … $res_str .= ut_nfmt_get_error_message( $fmt ) . " (" . ut_nfmt_get_error_code( $fmt ) . ")\n"; 31 $res = ut_nfmt_get_pattern( $fmt ); 33 … $res_str .= ut_nfmt_get_error_message( $fmt ) . " (" . ut_nfmt_get_error_code( $fmt ) . ")\n"; 34 $res_str .= "New pattern: '" . ut_nfmt_get_pattern( $fmt ) . "'\n"; 35 $res_str .= "Formatted number: " . ut_nfmt_format( $fmt, $test_value ) . "\n"; 37 ut_nfmt_set_pattern($fmt, str_repeat('@', 200)); [all …]
|
H A D | msgfmt_get_set_pattern.phpt | 16 $fmt = ut_msgfmt_create( "en_US", "{0,number} monkeys on {1,number} trees" ); 19 $res_str .= "Default pattern: '" . ut_msgfmt_get_pattern( $fmt ) . "'\n"; 20 $res_str .= "Formatting result: " . ut_msgfmt_format( $fmt, array(123, 456) ) . "\n"; 24 $res = ut_msgfmt_set_pattern( $fmt, $pattern ); 26 … $res_str .= ut_msgfmt_get_error_message( $fmt ) . " (" . ut_msgfmt_get_error_code( $fmt ) . ")\n"; 29 $res = ut_msgfmt_get_pattern( $fmt ); 31 … $res_str .= ut_msgfmt_get_error_message( $fmt ) . " (" . ut_msgfmt_get_error_code( $fmt ) . ")\n"; 32 $res_str .= "New pattern: '" . ut_msgfmt_get_pattern( $fmt ) . "'\n"; 35 ut_msgfmt_set_pattern($fmt, str_repeat($pattern, 10)); 36 $res_str .= "New pattern: '" . ut_msgfmt_get_pattern( $fmt ) . "'\n"; [all …]
|
H A D | formatter_clone.phpt | 14 $fmt = new NumberFormatter( "en_US", NumberFormatter::PATTERN_DECIMAL ); 15 $res_str .= "Formatted number: " . ut_nfmt_format( $fmt, $test_value ) . "\n"; 16 $fmt_clone = clone $fmt; 18 $res = $fmt->setPattern("0.0" ); 20 $res_str .= ut_nfmt_get_error_message( $fmt ) . " (" . ut_nfmt_get_error_code( $fmt ) . ")\n"; 22 $res_str .= "Formatted number: " . ut_nfmt_format( $fmt, $test_value ) . "\n";
|
H A D | msgfmt_fail2.phpt | 8 function err($fmt) { 9 if(!$fmt) { 63 err($fmt); 70 err($fmt); 77 err($fmt); 84 err($fmt); 91 err($fmt); 98 err($fmt); 102 err($fmt); 104 err($fmt); [all …]
|
H A D | formatter_fail.phpt | 8 function err($fmt) { 9 if(!$fmt) { 60 $fmt = null; 62 err($fmt); 67 $fmt = null; 69 err($fmt); 76 err($fmt); 85 err($fmt); 89 err($fmt); 91 err($fmt); [all …]
|
H A D | formatter_parse.phpt | 18 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL ); 19 $res_str .= ut_nfmt_parse( $fmt, "123E-3" ) . "\n"; 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 D | dateformat_create_default.phpt | 13 $fmt = IntlDateFormatter::create('en_US'); 14 echo $fmt->format($ts), "\n"; 16 $fmt = new IntlDateFormatter('en_US'); 17 echo $fmt->format($ts), "\n"; 19 $fmt = datefmt_create('en_US'); 20 echo $fmt->format($ts), "\n";
|
H A D | dateformat_create_default_icu72-1.phpt | 13 $fmt = IntlDateFormatter::create('en_US'); 14 echo $fmt->format($ts), "\n"; 16 $fmt = new IntlDateFormatter('en_US'); 17 echo $fmt->format($ts), "\n"; 19 $fmt = datefmt_create('en_US'); 20 echo $fmt->format($ts), "\n";
|
H A D | bug53735.phpt | 10 $fmt = numfmt_create("da_DK", \NumberFormatter::CURRENCY); 12 var_dump(numfmt_format($fmt, 5.5)); 15 var_dump(numfmt_format($fmt, 5.5)); 18 $fmt = new \NumberFormatter("de_DE", \NumberFormatter::DECIMAL); 19 var_dump($fmt->format(23.25));
|
H A D | msgfmt_clone.phpt | 13 $fmt = ut_msgfmt_create( "en_US", "{0,number} monkeys on {1,number} trees" ); 16 $res_str .= "Formatting result: " . ut_msgfmt_format( $fmt, array(123, 456) ) . "\n"; 17 $fmt_clone = clone $fmt; 20 $res = ut_msgfmt_set_pattern( $fmt, $pattern ); 21 $res_str .= "Formatting result: " . ut_msgfmt_format( $fmt, array(123, 456) ) . "\n";
|
H A D | formatter_get_set_text_attribute.phpt | 33 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL ); 41 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 ); 44 $def_val = ut_nfmt_get_text_attribute( $fmt, $attr ); 46 $res_str .= "get_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n"; 52 $res_val = ut_nfmt_set_text_attribute( $fmt, $attr, $new_val ); 54 $res_str .= "set_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n"; 57 $new_val_check = ut_nfmt_get_text_attribute( $fmt, $attr ); 66 ut_nfmt_set_text_attribute( $fmt, $attr, $def_val ); 69 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 ); 73 $fmt = ut_nfmt_create( "uk_UA", NumberFormatter::CURRENCY ); [all …]
|
H A D | formatter_get_set_text_attribute_var2.phpt | 33 $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL ); 41 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 21 ); 44 $def_val = ut_nfmt_get_text_attribute( $fmt, $attr ); 46 $res_str .= "get_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n"; 52 $res_val = ut_nfmt_set_text_attribute( $fmt, $attr, $new_val ); 54 $res_str .= "set_text_attribute() error: " . ut_nfmt_get_error_message( $fmt ) . "\n"; 57 $new_val_check = ut_nfmt_get_text_attribute( $fmt, $attr ); 66 ut_nfmt_set_text_attribute( $fmt, $attr, $def_val ); 69 ut_nfmt_set_attribute( $fmt, NumberFormatter::FORMAT_WIDTH, 0 ); 73 $fmt = ut_nfmt_create( "uk_UA", NumberFormatter::CURRENCY ); [all …]
|
H A D | formatter_get_error.phpt | 15 $fmt = ut_nfmt_create( "en_US", NumberFormatter::CURRENCY ); 18 $num = ut_nfmt_parse_currency( $fmt, '123.45', $currency, $pos ); 20 return $fmt->getErrorMessage() . " (" . $fmt->getErrorCode() . ")\n";
|
H A D | formatter_parse_currency.phpt | 16 $fmt = ut_nfmt_create( "en_US", NumberFormatter::CURRENCY ); 19 $num = ut_nfmt_parse_currency( $fmt, '$9,988,776.65', $currency, $pos ); 22 $fmt = ut_nfmt_create( "en_US", NumberFormatter::CURRENCY ); 25 $num = ut_nfmt_parse_currency( $fmt, ' $123.45', $currency, $pos );
|
H A D | bug14562.phpt | 12 $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); 13 $numeric = $fmt->parse("1234,56"); 16 $fmt = new NumberFormatter("de", NumberFormatter::DECIMAL ); 17 $numeric = $fmt->parse("1234,56");
|
H A D | dateformat_clone2.phpt | 14 $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_… 16 $formatted = ut_datefmt_format($fmt,0); 19 $fmt_clone = clone $fmt; 20 ut_datefmt_set_pattern( $fmt , 'yyyy-DDD.hh:mm:ss z' ); 22 $formatted = ut_datefmt_format($fmt,0);
|
H A D | dateformat_is_set_lenient.phpt | 19 …$fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/… 22 $resLenient1 = ut_datefmt_is_lenient( $fmt); 39 ut_datefmt_set_lenient( $fmt , $isLenient ); 40 $resLenient = ut_datefmt_is_lenient( $fmt); 58 ut_datefmt_set_lenient( $fmt , $isLenient); 59 $resLenient = ut_datefmt_is_lenient( $fmt);
|
H A D | bug81019.phpt | 8 $fmt = new NumberFormatter('en_US', NumberFormatter::DECIMAL); 9 $fmt->parse('abc'); 10 $fmt2 = clone $fmt;
|
/php-src/main/ |
H A D | spprintf.c | 231 fmt++; in xbuf_format_converter() 236 if (isascii((int)*fmt) && !islower((int)*fmt)) { in xbuf_format_converter() 263 fmt++; in xbuf_format_converter() 277 fmt++; in xbuf_format_converter() 297 fmt++; in xbuf_format_converter() 301 fmt++; in xbuf_format_converter() 311 fmt++; in xbuf_format_converter() 315 fmt++; in xbuf_format_converter() 323 fmt++; in xbuf_format_converter() 341 fmt++; in xbuf_format_converter() [all …]
|
H A D | snprintf.c | 531 fmt++; in format_converter() 536 if (isascii((int)*fmt) && !islower((int)*fmt)) { in format_converter() 563 fmt++; in format_converter() 577 fmt++; in format_converter() 597 fmt++; in format_converter() 601 fmt++; in format_converter() 611 fmt++; in format_converter() 615 fmt++; in format_converter() 623 fmt++; in format_converter() 641 fmt++; in format_converter() [all …]
|
/php-src/ext/intl/formatter/ |
H A D | formatter_functions_arginfo.h | 10 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/gd/libgd/ |
H A D | gd_gd2.c | 35 #define gd2_compressed(fmt) (((fmt) == GD2_FMT_COMPRESSED) || ((fmt) == GD2_FMT_TRUECOLOR_COMPRESSE… argument 36 #define gd2_truecolor(fmt) (((fmt) == GD2_FMT_TRUECOLOR_RAW) || ((fmt) == GD2_FMT_TRUECOLOR_COMPRES… argument 122 …if ((*fmt != GD2_FMT_RAW) && (*fmt != GD2_FMT_COMPRESSED) && (*fmt != GD2_FMT_TRUECOLOR_RAW) && (*… in _gd2GetHeader() 139 if (gd2_compressed(*fmt)) { in _gd2GetHeader() 192 if (gd2_truecolor(*fmt)) { in _gd2CreateFromFile() 273 int vers, fmt; in gdImageCreateFromGd2Ctx() local 443 int vers, fmt; in gdImageCreateFromGd2PartCtx() local 470 if (gd2_truecolor(fmt)) { in gdImageCreateFromGd2PartCtx() 659 gdPutWord(fmt, out); in _gd2PutHeader() 681 if ((fmt != GD2_FMT_RAW) && (fmt != GD2_FMT_COMPRESSED)) { in _gdImageGd2() [all …]
|
/php-src/sapi/phpdbg/ |
H A D | phpdbg_out.h | 40 PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); 41 PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3); 48 #define phpdbg_log(fmt, ...) phpdbg_log_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, … argument 49 #define phpdbg_out(fmt, ...) phpdbg_out_internal(PHPDBG_G(io)[PHPDBG_STDOUT].fd, … argument
|