php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54561
Patch INTL_ICU_VERSION revision 2011-04-18 16:18 UTC by david dot zuelke at bitextender dot com

Patch INTL_ICU_VERSION for *Languages/Translation Bug #54561

Patch version 2011-04-18 16:18 UTC

Return to Bug #54561 | Download this patch
Patch Revisions:

Developer: david.zuelke@bitextender.com

Index: php_intl.c
===================================================================
--- php_intl.c	(revision 310233)
+++ php_intl.c	(working copy)
@@ -543,6 +543,7 @@
 	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);
 
 	/* Register 'Collator' PHP class */
 	collator_register_Collator_class( TSRMLS_C );
Index: tests/intl_icu_version_constant.phpt
===================================================================
--- tests/intl_icu_version_constant.phpt	(revision 0)
+++ tests/intl_icu_version_constant.phpt	(revision 0)
@@ -0,0 +1,10 @@
+--TEST--
+INTL_ICU_VERSION constant
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+var_dump(defined("INTL_ICU_VERSION"));
+?>
+--EXPECT--
+bool(true)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC