diff options
author | Anatol Belski <ab@php.net> | 2017-10-21 16:17:31 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-10-21 16:17:31 +0200 |
commit | ff1b1c27616e0681ab5447f362a15fa3fc53ffa9 (patch) | |
tree | a4c338c154f5218b935e2e9832c5d9dbf9cf0737 /ext/intl/php_intl.c | |
parent | 73d68ff3e0292c0f954ec3cb717918a9b4ee97a2 (diff) | |
download | php-git-ff1b1c27616e0681ab5447f362a15fa3fc53ffa9.tar.gz |
Add TZ and Unicode versions to intl MINFO
Diffstat (limited to 'ext/intl/php_intl.c')
-rw-r--r-- | ext/intl/php_intl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 77cb2bac3c..b97004d03f 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -1045,6 +1045,11 @@ PHP_RSHUTDOWN_FUNCTION( intl ) */ PHP_MINFO_FUNCTION( intl ) { +#if !UCONFIG_NO_FORMATTING + UErrorCode status = U_ZERO_ERROR; + const char *tzdata_ver = NULL; +#endif + php_info_print_table_start(); php_info_print_table_header( 2, "Internationalization support", "enabled" ); php_info_print_table_row( 2, "version", INTL_MODULE_VERSION ); @@ -1052,6 +1057,13 @@ PHP_MINFO_FUNCTION( intl ) #ifdef U_ICU_DATA_VERSION php_info_print_table_row( 2, "ICU Data version", U_ICU_DATA_VERSION ); #endif +#if !UCONFIG_NO_FORMATTING + tzdata_ver = ucal_getTZDataVersion(&status); + if (U_ZERO_ERROR == status) { + php_info_print_table_row( 2, "ICU TZData version", tzdata_ver); + } +#endif + php_info_print_table_row( 2, "ICU Unicode version", U_UNICODE_VERSION ); php_info_print_table_end(); /* For the default locale php.ini setting */ |