From: Ilia Alshanetsky Date: Wed, 1 Jun 2011 16:26:21 +0000 (+0000) Subject: Implemented FR #54561 (Expose ICU Version & ICU Data Version info). X-Git-Tag: php-5.4.0alpha1~106 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8ffccb3ab3d4a98657b1ef269c270e5774a30bc;p=php Implemented FR #54561 (Expose ICU Version & ICU Data Version info). --- diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index ab5640486d..fa328cc5af 100755 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -590,6 +590,10 @@ PHP_MINIT_FUNCTION( intl ) REGISTER_INI_ENTRIES(); REGISTER_LONG_CONSTANT("INTL_MAX_LOCALE_LEN", INTL_MAX_LOCALE_LEN, CONST_CS); + REGISTER_STRING_CONSTANT("INTL_ICU_VERSION", U_ICU_VERSION, CONST_PERSISTENT | CONST_CS); +#ifdef U_ICU_DATA_VERSION + REGISTER_STRING_CONSTANT("INTL_ICU_DATA_VERSION", U_ICU_DATA_VERSION, CONST_PERSISTENT | CONST_CS); +#endif /* Register 'Collator' PHP class */ collator_register_Collator_class( TSRMLS_C ); diff --git a/ext/intl/tests/intl_icu_version_constant.phpt b/ext/intl/tests/intl_icu_version_constant.phpt new file mode 100644 index 0000000000..13160693c2 --- /dev/null +++ b/ext/intl/tests/intl_icu_version_constant.phpt @@ -0,0 +1,10 @@ +--TEST-- +INTL_ICU_VERSION constant +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true)