From ff1b1c27616e0681ab5447f362a15fa3fc53ffa9 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 21 Oct 2017 16:17:31 +0200 Subject: Add TZ and Unicode versions to intl MINFO --- ext/intl/php_intl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ext/intl/php_intl.c') 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 */ -- cgit v1.2.1