summaryrefslogtreecommitdiff
path: root/ext/intl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl')
-rw-r--r--ext/intl/breakiterator/breakiterator_class.cpp2
-rw-r--r--ext/intl/breakiterator/breakiterator_iterators.cpp3
-rw-r--r--ext/intl/breakiterator/breakiterator_methods.cpp20
-rw-r--r--ext/intl/breakiterator/codepointiterator_methods.cpp2
-rw-r--r--ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp18
-rw-r--r--ext/intl/calendar/calendar_class.cpp14
-rw-r--r--ext/intl/calendar/calendar_methods.cpp32
-rw-r--r--ext/intl/calendar/gregoriancalendar_methods.cpp7
-rw-r--r--ext/intl/collator/collator.c9
-rw-r--r--ext/intl/collator/collator_attr.c9
-rw-r--r--ext/intl/collator/collator_class.c11
-rw-r--r--ext/intl/collator/collator_compare.c9
-rw-r--r--ext/intl/collator/collator_convert.c8
-rw-r--r--ext/intl/collator/collator_create.c11
-rw-r--r--ext/intl/collator/collator_error.c9
-rw-r--r--ext/intl/collator/collator_is_numeric.c9
-rw-r--r--ext/intl/collator/collator_locale.c9
-rw-r--r--ext/intl/collator/collator_sort.c9
-rw-r--r--ext/intl/common/common_date.cpp7
-rw-r--r--ext/intl/common/common_enum.h2
-rw-r--r--ext/intl/common/common_error.c11
-rw-r--r--ext/intl/config.m421
-rw-r--r--ext/intl/converter/converter.c47
-rw-r--r--ext/intl/dateformat/dateformat_class.c2
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp6
-rw-r--r--ext/intl/dateformat/dateformat_parse.c2
-rw-r--r--ext/intl/formatter/formatter.c18
-rw-r--r--ext/intl/formatter/formatter_attr.c9
-rw-r--r--ext/intl/formatter/formatter_class.c11
-rw-r--r--ext/intl/formatter/formatter_data.c9
-rw-r--r--ext/intl/formatter/formatter_format.c9
-rw-r--r--ext/intl/formatter/formatter_main.c11
-rw-r--r--ext/intl/formatter/formatter_parse.c33
-rw-r--r--ext/intl/grapheme/grapheme_string.c11
-rw-r--r--ext/intl/grapheme/grapheme_util.c9
-rw-r--r--ext/intl/idn/idn.c64
-rw-r--r--ext/intl/idn/idn.h2
-rw-r--r--ext/intl/intl_convert.c9
-rw-r--r--ext/intl/intl_error.c9
-rw-r--r--ext/intl/locale/locale.c9
-rw-r--r--ext/intl/locale/locale_class.c9
-rw-r--r--ext/intl/locale/locale_methods.c16
-rw-r--r--ext/intl/msgformat/msgformat.c11
-rw-r--r--ext/intl/msgformat/msgformat_attr.c9
-rw-r--r--ext/intl/msgformat/msgformat_class.c11
-rw-r--r--ext/intl/msgformat/msgformat_class.h4
-rw-r--r--ext/intl/msgformat/msgformat_data.c10
-rw-r--r--ext/intl/msgformat/msgformat_format.c9
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp36
-rw-r--r--ext/intl/msgformat/msgformat_parse.c9
-rw-r--r--ext/intl/normalizer/normalizer.c9
-rw-r--r--ext/intl/normalizer/normalizer_class.c9
-rw-r--r--ext/intl/normalizer/normalizer_normalize.c11
-rw-r--r--ext/intl/php_intl.c29
-rw-r--r--ext/intl/php_intl.h9
-rw-r--r--ext/intl/resourcebundle/resourcebundle.c9
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c13
-rw-r--r--ext/intl/resourcebundle/resourcebundle_iterator.c9
-rw-r--r--ext/intl/spoofchecker/spoofchecker.c9
-rw-r--r--ext/intl/spoofchecker/spoofchecker_class.c11
-rw-r--r--ext/intl/spoofchecker/spoofchecker_class.h2
-rw-r--r--ext/intl/spoofchecker/spoofchecker_create.c9
-rw-r--r--ext/intl/spoofchecker/spoofchecker_main.c9
-rw-r--r--ext/intl/tests/breakiter___construct_error.phpt1
-rw-r--r--ext/intl/tests/bug62070.phpt1
-rw-r--r--ext/intl/tests/bug74484_MessageFormatter.phpt2
-rw-r--r--ext/intl/tests/bug76942_MessageFormatter.phpt33
-rw-r--r--ext/intl/tests/calendar_createInstance_basic.phpt2
-rw-r--r--ext/intl/tests/calendar_createInstance_variation1.phpt4
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getDayOfWeekType_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getLocale_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt2
-rw-r--r--ext/intl/tests/calendar_getTimeZone_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_getWeekendTransition_error.phpt2
-rw-r--r--ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt2
-rw-r--r--ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt2
-rw-r--r--ext/intl/tests/calendar_isWeekend_basic.phpt4
-rw-r--r--ext/intl/tests/calendar_isWeekend_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt2
-rw-r--r--ext/intl/tests/calendar_setTimeZone_basic.phpt4
-rw-r--r--ext/intl/tests/collator_create.phpt82
-rw-r--r--ext/intl/tests/collator_create2.phpt1
-rw-r--r--ext/intl/tests/collator_get_locale.phpt53
-rw-r--r--ext/intl/tests/collator_get_locale2.phpt1
-rw-r--r--ext/intl/tests/collator_get_sort_key.phpt1
-rw-r--r--ext/intl/tests/dateformat_clone.phpt37
-rw-r--r--ext/intl/tests/dateformat_clone2.phpt1
-rw-r--r--ext/intl/tests/dateformat_get_set_pattern.phpt84
-rw-r--r--ext/intl/tests/dateformat_get_set_pattern2.phpt1
-rw-r--r--ext/intl/tests/dateformat_localtime.phpt136
-rw-r--r--ext/intl/tests/dateformat_parse.phpt112
-rw-r--r--ext/intl/tests/dateformat_parse_localtime_parsepos.phpt120
-rw-r--r--ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt157
-rw-r--r--ext/intl/tests/dateformat_set_timezone_id.phpt76
-rw-r--r--ext/intl/tests/dateformat_set_timezone_id2.phpt3
-rw-r--r--ext/intl/tests/formatter_format.phpt130
-rw-r--r--ext/intl/tests/formatter_format2.phpt4
-rw-r--r--ext/intl/tests/formatter_format_currency.phpt50
-rw-r--r--ext/intl/tests/formatter_format_currency2.phpt3
-rw-r--r--ext/intl/tests/formatter_get_set_attribute.phpt194
-rw-r--r--ext/intl/tests/formatter_get_set_symbol.phpt189
-rw-r--r--ext/intl/tests/formatter_get_set_symbol2.phpt3
-rw-r--r--ext/intl/tests/gregoriancalendar___construct_basic.phpt4
-rw-r--r--ext/intl/tests/idn.phpt3
-rw-r--r--ext/intl/tests/intl_icu_data_version_constant.phpt2
-rw-r--r--ext/intl/tests/locale_filter_matches.phpt366
-rw-r--r--ext/intl/tests/locale_filter_matches2.phpt3
-rw-r--r--ext/intl/tests/locale_get_display_name.phpt342
-rw-r--r--ext/intl/tests/locale_get_display_name2.phpt3
-rw-r--r--ext/intl/tests/locale_get_display_region.phpt275
-rw-r--r--ext/intl/tests/locale_get_display_region2.phpt5
-rw-r--r--ext/intl/tests/locale_get_display_script.phpt275
-rw-r--r--ext/intl/tests/locale_get_display_script2.phpt275
-rw-r--r--ext/intl/tests/locale_get_display_script3.phpt4
-rw-r--r--ext/intl/tests/locale_get_display_script4.phpt4
-rw-r--r--ext/intl/tests/locale_get_display_variant.phpt275
-rw-r--r--ext/intl/tests/locale_get_display_variant2.phpt3
-rw-r--r--ext/intl/tests/locale_get_keywords.phpt140
-rw-r--r--ext/intl/tests/locale_get_keywords2.phpt3
-rw-r--r--ext/intl/tests/locale_parse_locale.phpt203
-rw-r--r--ext/intl/tests/locale_parse_locale2.phpt3
-rw-r--r--ext/intl/tests/msgfmt_bug70484.phpt2
-rw-r--r--ext/intl/tests/msgfmt_fail.phpt132
-rw-r--r--ext/intl/tests/msgfmt_fail2.phpt3
-rw-r--r--ext/intl/tests/msgfmt_format_error2.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_error3.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_error4.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_error5.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_error6.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_mixed_params.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_subpatterns.phpt2
-rw-r--r--ext/intl/tests/msgfmt_format_subpatterns_named.phpt2
-rw-r--r--ext/intl/tests/normalizer_get_raw_decomposition.phpt4
-rw-r--r--ext/intl/tests/normalizer_normalize_kc_cf.phpt4
-rw-r--r--ext/intl/tests/rbbiter_getBinaryRules_basic.phpt1
-rw-r--r--ext/intl/tests/resourcebundle_internal.phpt4
-rw-r--r--ext/intl/tests/resourcebundle_null_mandatory_args.phpt1
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt4
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt2
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt4
-rw-r--r--ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt4
-rw-r--r--ext/intl/tests/timezone_createTimeZone_basic.phpt4
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt1
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant2.phpt40
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt1
-rw-r--r--ext/intl/tests/timezone_getDisplayName_variant3.phpt28
-rw-r--r--ext/intl/tests/timezone_getRegion_basic.phpt4
-rw-r--r--ext/intl/tests/timezone_getRegion_error.phpt2
-rw-r--r--ext/intl/tests/timezone_getUnknown_basic.phpt2
-rw-r--r--ext/intl/tests/timezone_getUnknown_error.phpt2
-rw-r--r--ext/intl/tests/uconverter_getDestinationEncoding.phpt14
-rw-r--r--ext/intl/tests/uconverter_getSourceEncoding.phpt14
-rw-r--r--ext/intl/tests/uconverter_setSourceEncoding.phpt17
-rw-r--r--ext/intl/timezone/timezone_class.cpp10
-rw-r--r--ext/intl/timezone/timezone_methods.cpp8
-rw-r--r--ext/intl/transliterator/transliterator.c9
-rw-r--r--ext/intl/transliterator/transliterator_class.c18
-rw-r--r--ext/intl/transliterator/transliterator_methods.c10
-rw-r--r--ext/intl/uchar/ublockcode-enum.h6
-rw-r--r--ext/intl/uchar/uchar.c2
-rw-r--r--ext/intl/uchar/uother-enum.h18
-rw-r--r--ext/intl/uchar/uproperty-enum.h4
168 files changed, 186 insertions, 4692 deletions
diff --git a/ext/intl/breakiterator/breakiterator_class.cpp b/ext/intl/breakiterator/breakiterator_class.cpp
index 8c47aaf860..0d64efece4 100644
--- a/ext/intl/breakiterator/breakiterator_class.cpp
+++ b/ext/intl/breakiterator/breakiterator_class.cpp
@@ -290,9 +290,7 @@ static const zend_function_entry RuleBasedBreakIterator_class_functions[] = {
PHP_ME_MAPPING(getRules, rbbi_get_rules, ainfo_biter_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getRuleStatus, rbbi_get_rule_status, ainfo_biter_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getRuleStatusVec, rbbi_get_rule_status_vec, ainfo_biter_void, ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_ME_MAPPING(getBinaryRules, rbbi_get_binary_rules, ainfo_biter_void, ZEND_ACC_PUBLIC)
-#endif
PHP_FE_END
};
/* }}} */
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp
index c90300155a..9969561206 100644
--- a/ext/intl/breakiterator/breakiterator_iterators.cpp
+++ b/ext/intl/breakiterator/breakiterator_iterators.cpp
@@ -168,10 +168,9 @@ static void _breakiterator_parts_move_forward(zend_object_iterator *iter)
* No need to do anything, the engine increments ->index */
const char *s = Z_STRVAL(bio->text);
- size_t slen = Z_STRLEN(bio->text);
zend_string *res;
- assert(next <= slen && next >= cur);
+ assert(next <= Z_STRLEN(bio->text) && next >= cur);
res = zend_string_alloc(next - cur, 0);
memcpy(ZSTR_VAL(res), &s[cur], ZSTR_LEN(res));
diff --git a/ext/intl/breakiterator/breakiterator_methods.cpp b/ext/intl/breakiterator/breakiterator_methods.cpp
index 1d40a85494..6d6211db73 100644
--- a/ext/intl/breakiterator/breakiterator_methods.cpp
+++ b/ext/intl/breakiterator/breakiterator_methods.cpp
@@ -130,7 +130,7 @@ U_CFUNC PHP_FUNCTION(breakiter_create_code_point_instance)
U_CFUNC PHP_FUNCTION(breakiter_get_text)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -152,7 +152,7 @@ U_CFUNC PHP_FUNCTION(breakiter_set_text)
UText *ut = NULL;
zend_string *text;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -186,7 +186,7 @@ static void _breakiter_no_args_ret_int32(
{
char *msg;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
spprintf(&msg, 0, "%s: bad arguments", func_name);
@@ -210,7 +210,7 @@ static void _breakiter_int32_ret_int32(
char *msg;
zend_long arg;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &arg) == FAILURE) {
spprintf(&msg, 0, "%s: bad arguments", func_name);
@@ -287,7 +287,7 @@ U_CFUNC PHP_FUNCTION(breakiter_next)
U_CFUNC PHP_FUNCTION(breakiter_current)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -320,7 +320,7 @@ U_CFUNC PHP_FUNCTION(breakiter_is_boundary)
{
zend_long offset;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l",
&offset) == FAILURE) {
@@ -347,7 +347,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_locale)
{
zend_long locale_type;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &locale_type) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -375,7 +375,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
{
zend_long key_type = 0;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &key_type) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -400,7 +400,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_parts_iterator)
U_CFUNC PHP_FUNCTION(breakiter_get_error_code)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -420,7 +420,7 @@ U_CFUNC PHP_FUNCTION(breakiter_get_error_message)
{
zend_string* message = NULL;
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
diff --git a/ext/intl/breakiterator/codepointiterator_methods.cpp b/ext/intl/breakiterator/codepointiterator_methods.cpp
index f916915ae2..f1dd0960e6 100644
--- a/ext/intl/breakiterator/codepointiterator_methods.cpp
+++ b/ext/intl/breakiterator/codepointiterator_methods.cpp
@@ -30,7 +30,7 @@ static inline CodePointBreakIterator *fetch_cpbi(BreakIterator_object *bio) {
U_CFUNC PHP_FUNCTION(cpbi_get_last_code_point)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
diff --git a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
index 954efb8e0a..5529d06718 100644
--- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp
@@ -77,7 +77,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
return;
}
} else { // compiled
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
rbbi = new RuleBasedBreakIterator((uint8_t*)rules, rules_len, status);
if (U_FAILURE(status)) {
intl_error_set(NULL, status, "rbbi_create_instance: unable to "
@@ -85,11 +84,6 @@ static void _php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
delete rbbi;
return;
}
-#else
- intl_error_set(NULL, U_UNSUPPORTED_ERROR, "rbbi_create_instance: "
- "compiled rules require ICU >= 4.8", 0);
- return;
-#endif
}
breakiterator_object_create(return_value, rbbi, 0);
@@ -100,7 +94,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct)
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
_php_intlrbbi_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU);
zend_restore_error_handling(&error_handling);
}
@@ -108,7 +102,7 @@ U_CFUNC PHP_METHOD(IntlRuleBasedBreakIterator, __construct)
U_CFUNC PHP_FUNCTION(rbbi_get_rules)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -135,7 +129,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rules)
U_CFUNC PHP_FUNCTION(rbbi_get_rule_status)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -151,7 +145,7 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status)
U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -188,11 +182,10 @@ U_CFUNC PHP_FUNCTION(rbbi_get_rule_status_vec)
delete[] rules;
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules)
{
BREAKITER_METHOD_INIT_VARS;
- object = getThis();
+ object = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -218,4 +211,3 @@ U_CFUNC PHP_FUNCTION(rbbi_get_binary_rules)
RETURN_STR(ret_rules);
}
-#endif
diff --git a/ext/intl/calendar/calendar_class.cpp b/ext/intl/calendar/calendar_class.cpp
index 8189beffd4..29eb9eef44 100644
--- a/ext/intl/calendar/calendar_class.cpp
+++ b/ext/intl/calendar/calendar_class.cpp
@@ -377,9 +377,7 @@ ZEND_END_ARG_INFO()
static const zend_function_entry Calendar_class_functions[] = {
PHP_ME(IntlCalendar, __construct, ainfo_cal_void, ZEND_ACC_PRIVATE)
PHP_ME_MAPPING(createInstance, intlcal_create_instance, ainfo_cal_createInstance, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
PHP_ME_MAPPING(getKeywordValuesForLocale, intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
-#endif
PHP_ME_MAPPING(getNow, intlcal_get_now, ainfo_cal_void, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getAvailableLocales, intlcal_get_available_locales, ainfo_cal_void, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(get, intlcal_get, ainfo_cal_field, ZEND_ACC_PUBLIC)
@@ -395,9 +393,7 @@ static const zend_function_entry Calendar_class_functions[] = {
PHP_ME_MAPPING(fieldDifference, intlcal_field_difference, ainfo_cal_field_difference, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getActualMaximum, intlcal_get_actual_maximum, ainfo_cal_field, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getActualMinimum, intlcal_get_actual_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_ME_MAPPING(getDayOfWeekType, intlcal_get_day_of_week_type, ainfo_cal_dow, ZEND_ACC_PUBLIC)
-#endif
PHP_ME_MAPPING(getFirstDayOfWeek, intlcal_get_first_day_of_week, ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getGreatestMinimum, intlcal_get_greatest_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getLeastMaximum, intlcal_get_least_maximum, ainfo_cal_field, ZEND_ACC_PUBLIC)
@@ -407,26 +403,20 @@ static const zend_function_entry Calendar_class_functions[] = {
PHP_ME_MAPPING(getMinimum, intlcal_get_minimum, ainfo_cal_field, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getTimeZone, intlcal_get_time_zone, ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getType, intlcal_get_type, ainfo_cal_void, ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_ME_MAPPING(getWeekendTransition,intlcal_get_weekend_transition, ainfo_cal_dow, ZEND_ACC_PUBLIC)
-#endif
PHP_ME_MAPPING(inDaylightTime, intlcal_in_daylight_time, ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(isEquivalentTo, intlcal_is_equivalent_to, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(isLenient, intlcal_is_lenient, ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(isSet, intlcal_is_set, ainfo_cal_field, ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_ME_MAPPING(isWeekend, intlcal_is_weekend, ainfo_cal_date_optional, ZEND_ACC_PUBLIC)
-#endif
PHP_ME_MAPPING(setFirstDayOfWeek, intlcal_set_first_day_of_week, ainfo_cal_dow, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setLenient, intlcal_set_lenient, ainfo_cal_setLenient, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setMinimalDaysInFirstWeek,intlcal_set_minimal_days_in_first_week,ainfo_cal_set_minimal_days_in_first_week,ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(equals, intlcal_equals, ainfo_cal_other_cal, ZEND_ACC_PUBLIC)
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_ME_MAPPING(getRepeatedWallTimeOption,intlcal_get_repeated_wall_time_option,ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getSkippedWallTimeOption,intlcal_get_skipped_wall_time_option,ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setRepeatedWallTimeOption,intlcal_set_repeated_wall_time_option,ainfo_cal_wall_time_option,ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setSkippedWallTimeOption,intlcal_set_skipped_wall_time_option,ainfo_cal_wall_time_option,ZEND_ACC_PUBLIC)
-#endif
PHP_ME_MAPPING(fromDateTime, intlcal_from_date_time, ainfo_cal_from_date_time, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(toDateTime, intlcal_to_date_time, ainfo_cal_void, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getErrorCode, intlcal_get_error_code, ainfo_cal_void, ZEND_ACC_PUBLIC)
@@ -505,18 +495,14 @@ void calendar_register_IntlCalendar_class(void)
CALENDAR_DECL_LONG_CONST("DOW_FRIDAY", UCAL_FRIDAY);
CALENDAR_DECL_LONG_CONST("DOW_SATURDAY", UCAL_SATURDAY);
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKDAY", UCAL_WEEKDAY);
CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND", UCAL_WEEKEND);
CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND_OFFSET", UCAL_WEEKEND_ONSET);
CALENDAR_DECL_LONG_CONST("DOW_TYPE_WEEKEND_CEASE", UCAL_WEEKEND_CEASE);
-#endif
-#if U_ICU_VERSION_MAJOR_NUM >= 49
CALENDAR_DECL_LONG_CONST("WALLTIME_FIRST", UCAL_WALLTIME_FIRST);
CALENDAR_DECL_LONG_CONST("WALLTIME_LAST", UCAL_WALLTIME_LAST);
CALENDAR_DECL_LONG_CONST("WALLTIME_NEXT_VALID", UCAL_WALLTIME_NEXT_VALID);
-#endif
/* Create and register 'IntlGregorianCalendar' class. */
INIT_CLASS_ENTRY(ce, "IntlGregorianCalendar", GregorianCalendar_class_functions);
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index f5e0daf149..dfe34a4f03 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -89,7 +89,6 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance)
calendar_object_create(return_value, cal);
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
class BugStringCharEnumeration : public StringEnumeration
{
public:
@@ -185,7 +184,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
IntlIterator_from_StringEnumeration(se, return_value);
}
-#endif //ICU 4.2 only
U_CFUNC PHP_FUNCTION(intlcal_get_now)
{
@@ -411,23 +409,25 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
int variant; /* number of args of the set() overload */
CALENDAR_METHOD_INIT_VARS;
+ object = getThis();
+
/* must come before zpp because zpp would convert the args in the stack to 0 */
- if (ZEND_NUM_ARGS() > (getThis() ? 6 : 7) ||
+ if (ZEND_NUM_ARGS() > (object ? 6 : 7) ||
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_set: too many arguments", 0);
RETURN_FALSE;
}
- if (!getThis()) {
+ if (!object) {
args++;
}
- variant = ZEND_NUM_ARGS() - (getThis() ? 0 : 1);
+ variant = ZEND_NUM_ARGS() - (object ? 0 : 1);
while (variant > 2 && Z_TYPE(args[variant - 1]) == IS_NULL) {
variant--;
}
if (variant == 4 ||
- zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
+ zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
"Oll|llll", &object, Calendar_ce_ptr, &arg1, &arg2, &arg3, &arg4,
&arg5, &arg6) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -474,17 +474,19 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
zend_bool bool_variant_val = (zend_bool)-1;
CALENDAR_METHOD_INIT_VARS;
- if (ZEND_NUM_ARGS() > (getThis() ? 2 :3) ||
+ object = getThis();
+
+ if (ZEND_NUM_ARGS() > (object ? 2 :3) ||
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_set: too many arguments", 0);
RETURN_FALSE;
}
- if (!getThis()) {
+ if (!object) {
args++;
}
if (!Z_ISUNDEF(args[1]) && (Z_TYPE(args[1]) == IS_TRUE || Z_TYPE(args[1]) == IS_FALSE)) {
- if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
"Olb", &object, Calendar_ce_ptr, &field, &bool_variant_val)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -492,7 +494,7 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
RETURN_FALSE;
}
bool_variant_val = Z_TYPE(args[1]) == IS_TRUE? 1 : 0;
- } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
+ } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(), object,
"Oll", &object, Calendar_ce_ptr, &field, &value) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_roll: bad arguments", 0);
@@ -596,7 +598,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_actual_minimum)
"intlcal_get_actual_minimum", INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
{
zend_long dow;
@@ -624,7 +625,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
RETURN_LONG((zend_long)result);
}
-#endif
U_CFUNC PHP_FUNCTION(intlcal_get_first_day_of_week)
{
@@ -789,7 +789,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_type)
RETURN_STRING(co->ucal->getType());
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition)
{
zend_long dow;
@@ -817,7 +816,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition)
RETURN_LONG((zend_long)res);
}
-#endif
U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time)
{
@@ -904,7 +902,6 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set)
RETURN_BOOL((int)co->ucal->isSet((UCalendarDateFields)field));
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
{
double date;
@@ -929,7 +926,6 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
RETURN_BOOL((int)ret);
}
}
-#endif
U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week)
@@ -1030,8 +1026,6 @@ U_CFUNC PHP_FUNCTION(intlcal_equals)
RETURN_BOOL((int)result);
}
-#if U_ICU_VERSION_MAJOR_NUM >= 49
-
U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option)
{
CALENDAR_METHOD_INIT_VARS;
@@ -1115,8 +1109,6 @@ U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option)
RETURN_TRUE;
}
-#endif
-
U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
{
zval *zv_arg,
diff --git a/ext/intl/calendar/gregoriancalendar_methods.cpp b/ext/intl/calendar/gregoriancalendar_methods.cpp
index 004d8e0c4f..d96fffda6f 100644
--- a/ext/intl/calendar/gregoriancalendar_methods.cpp
+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp
@@ -185,12 +185,7 @@ static void _php_intlgregcal_constructor_body(
}
timelib_tzinfo *tzinfo = get_timezone_info();
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
UnicodeString tzstr = UnicodeString::fromUTF8(StringPiece(tzinfo->name));
-#else
- UnicodeString tzstr = UnicodeString(tzinfo->name,
- strlen(tzinfo->name), US_INV);
-#endif
if (tzstr.isBogus()) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlgregcal_create_instance: could not create UTF-8 string "
@@ -225,7 +220,7 @@ U_CFUNC PHP_METHOD(IntlGregorianCalendar, __construct)
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
_php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
zend_restore_error_handling(&error_handling);
}
diff --git a/ext/intl/collator/collator.c b/ext/intl/collator/collator.c
index d86139c9e0..f450091df7 100644
--- a/ext/intl/collator/collator.c
+++ b/ext/intl/collator/collator.c
@@ -85,12 +85,3 @@ void collator_register_constants( INIT_FUNC_ARGS )
#undef COLLATOR_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_attr.c b/ext/intl/collator/collator_attr.c
index 7063db3562..5170d4c720 100644
--- a/ext/intl/collator/collator_attr.c
+++ b/ext/intl/collator/collator_attr.c
@@ -146,12 +146,3 @@ PHP_FUNCTION( collator_set_strength )
RETURN_TRUE;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c
index d7d6ed4ed9..64ad9823e2 100644
--- a/ext/intl/collator/collator_class.c
+++ b/ext/intl/collator/collator_class.c
@@ -97,7 +97,7 @@ ZEND_END_ARG_INFO()
*/
static const zend_function_entry Collator_class_functions[] = {
- PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
PHP_NAMED_FE( sort, ZEND_FN( collator_sort ), collator_sort_args )
@@ -176,12 +176,3 @@ void collator_object_destroy( Collator_object* co )
intl_error_reset( COLLATOR_ERROR_P( co ) );
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c
index 983b9d7f2c..c95d144f1a 100644
--- a/ext/intl/collator/collator_compare.c
+++ b/ext/intl/collator/collator_compare.c
@@ -122,12 +122,3 @@ PHP_FUNCTION( collator_compare )
RETURN_LONG( result );
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c
index 6ec24afe10..2f0a80468e 100644
--- a/ext/intl/collator/collator_convert.c
+++ b/ext/intl/collator/collator_convert.c
@@ -444,11 +444,3 @@ zval* collator_normalize_sort_argument( zval* arg, zval *rv )
return n_arg;
}
/* }}} */
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_create.c b/ext/intl/collator/collator_create.c
index 424e680b13..cb2ff183e2 100644
--- a/ext/intl/collator/collator_create.c
+++ b/ext/intl/collator/collator_create.c
@@ -79,7 +79,7 @@ PHP_METHOD( Collator, __construct )
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
if (collator_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
@@ -88,12 +88,3 @@ PHP_METHOD( Collator, __construct )
zend_restore_error_handling(&error_handling);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_error.c b/ext/intl/collator/collator_error.c
index 5d30b8c655..b485cf14f1 100644
--- a/ext/intl/collator/collator_error.c
+++ b/ext/intl/collator/collator_error.c
@@ -83,12 +83,3 @@ PHP_FUNCTION( collator_get_error_message )
RETURN_STR(message);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_is_numeric.c b/ext/intl/collator/collator_is_numeric.c
index c60724bcfa..a561897a16 100644
--- a/ext/intl/collator/collator_is_numeric.c
+++ b/ext/intl/collator/collator_is_numeric.c
@@ -283,12 +283,3 @@ zend_uchar collator_is_numeric( UChar *str, int32_t length, zend_long *lval, dou
return 0;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c
index b3ea572be1..2a379bc977 100644
--- a/ext/intl/collator/collator_locale.c
+++ b/ext/intl/collator/collator_locale.c
@@ -69,12 +69,3 @@ PHP_FUNCTION( collator_get_locale )
RETVAL_STRINGL( locale_name, strlen(locale_name) );
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c
index 111dbeb195..292391c43b 100644
--- a/ext/intl/collator/collator_sort.c
+++ b/ext/intl/collator/collator_sort.c
@@ -617,12 +617,3 @@ PHP_FUNCTION( collator_get_sort_key )
RETVAL_NEW_STR(key_str);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp
index ca73269e48..b3e8a30f68 100644
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -83,14 +83,7 @@ U_CFUNC TimeZone *timezone_convert_datetimezone(int type,
UnicodeString s = UnicodeString(id, id_len, US_INV);
timeZone = TimeZone::createTimeZone(s);
-#if U_ICU_VERSION_MAJOR_NUM >= 49
if (*timeZone == TimeZone::getUnknown()) {
-#else
- UnicodeString resultingId;
- timeZone->getID(resultingId);
- if (resultingId == UnicodeString("Etc/Unknown", -1, US_INV)
- || resultingId == UnicodeString("GMT", -1, US_INV)) {
-#endif
spprintf(&message, 0, "%s: time zone id '%s' "
"extracted from ext/date DateTimeZone not recognized", func, id);
intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
diff --git a/ext/intl/common/common_enum.h b/ext/intl/common/common_enum.h
index 9e47115304..5b57e5cf18 100644
--- a/ext/intl/common/common_enum.h
+++ b/ext/intl/common/common_enum.h
@@ -40,7 +40,7 @@ extern "C" {
#define INTLITERATOR_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlIterator, ii)
#define INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(INTL_ITERATOR, ii)
#define INTLITERATOR_METHOD_FETCH_OBJECT\
- object = getThis(); \
+ object = ZEND_THIS; \
INTLITERATOR_METHOD_FETCH_OBJECT_NO_CHECK; \
if (ii->iterator == NULL) { \
intl_errors_set(&ii->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlIterator", 0); \
diff --git a/ext/intl/common/common_error.c b/ext/intl/common/common_error.c
index 16933c587f..a4a4e56b0a 100644
--- a/ext/intl/common/common_error.c
+++ b/ext/intl/common/common_error.c
@@ -241,9 +241,7 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
INTL_EXPOSE_CONST( U_IDNA_VERIFICATION_ERROR );
INTL_EXPOSE_CONST( U_IDNA_LABEL_TOO_LONG_ERROR );
INTL_EXPOSE_CONST( U_IDNA_ZERO_LENGTH_LABEL_ERROR );
-#if U_ICU_VERSION_MAJOR_NUM > 3 || U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM >= 8
INTL_EXPOSE_CONST( U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR );
-#endif
INTL_EXPOSE_CONST( U_IDNA_ERROR_LIMIT );
/* Aliases for StringPrep */
@@ -256,12 +254,3 @@ void intl_expose_icu_error_codes( INIT_FUNC_ARGS )
#undef INTL_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/config.m4 b/ext/intl/config.m4
index 4b9f469b38..53146b6b4e 100644
--- a/ext/intl/config.m4
+++ b/ext/intl/config.m4
@@ -8,16 +8,7 @@ PHP_ARG_ENABLE(intl, whether to enable internationalization support,
if test "$PHP_INTL" != "no"; then
PHP_SETUP_ICU(INTL_SHARED_LIBADD)
PHP_SUBST(INTL_SHARED_LIBADD)
- PHP_REQUIRE_CXX()
- INTL_COMMON_FLAGS="$ICU_INCS $ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
- if test "$icu_version" -ge "4002"; then
- icu_spoof_src=" spoofchecker/spoofchecker_class.c \
- spoofchecker/spoofchecker.c\
- spoofchecker/spoofchecker_create.c\
- spoofchecker/spoofchecker_main.c"
- else
- icu_spoof_src=""
- fi
+ INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION(intl, php_intl.c \
intl_error.c \
intl_convert.c \
@@ -68,7 +59,10 @@ if test "$PHP_INTL" != "no"; then
transliterator/transliterator_methods.c \
uchar/uchar.c \
idn/idn.c \
- $icu_spoof_src, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
+ spoofchecker/spoofchecker_class.c \
+ spoofchecker/spoofchecker.c\
+ spoofchecker/spoofchecker_create.c\
+ spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx)
PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \
common/common_enum.cpp \
@@ -89,7 +83,10 @@ if test "$PHP_INTL" != "no"; then
breakiterator/rulebasedbreakiterator_methods.cpp \
breakiterator/codepointiterator_internal.cpp \
breakiterator/codepointiterator_methods.cpp"
- PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $ICU_CXXFLAGS"
+
+ PHP_REQUIRE_CXX()
+ PHP_CXX_COMPILE_STDCXX(11, mandatory, PHP_INTL_STDCXX)
+ PHP_INTL_CXX_FLAGS="$INTL_COMMON_FLAGS $PHP_INTL_STDCXX $ICU_CXXFLAGS"
if test "$ext_shared" = "no"; then
PHP_ADD_SOURCES(PHP_EXT_DIR(intl), $PHP_INTL_CXX_SOURCES, $PHP_INTL_CXX_FLAGS)
else
diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c
index 95b0e6592c..992a1bade7 100644
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -18,10 +18,8 @@
#include "zend_exceptions.h"
#include <unicode/utypes.h>
-#if U_ICU_VERSION_MAJOR_NUM >= 49
#include <unicode/utf8.h>
#include <unicode/utf16.h>
-#endif
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
@@ -127,7 +125,7 @@ static PHP_METHOD(UConverter, toUCallback) {
return;
}
- php_converter_default_callback(return_value, getThis(), reason, error);
+ php_converter_default_callback(return_value, ZEND_THIS, reason, error);
}
/* }}} */
@@ -149,7 +147,7 @@ static PHP_METHOD(UConverter, fromUCallback) {
return;
}
- php_converter_default_callback(return_value, getThis(), reason, error);
+ php_converter_default_callback(return_value, ZEND_THIS, reason, error);
}
/* }}} */
@@ -416,7 +414,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_set_encoding_arginfo, 0, ZEND_RETURN_VALUE,
ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO();
static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_PARAMETERS) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
char *enc;
size_t enc_len;
@@ -433,14 +431,14 @@ static void php_converter_do_set_encoding(UConverter **pcnv, INTERNAL_FUNCTION_P
/* {{{ proto bool UConverter::setSourceEncoding(string encoding) */
static PHP_METHOD(UConverter, setSourceEncoding) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_set_encoding(&(objval->src), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ proto bool UConverter::setDestinationEncoding(string encoding) */
static PHP_METHOD(UConverter, setDestinationEncoding) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_set_encoding(&(objval->dest), INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
@@ -474,14 +472,14 @@ static void php_converter_do_get_encoding(php_converter_object *objval, UConvert
/* {{{ proto string UConverter::getSourceEncoding() */
static PHP_METHOD(UConverter, getSourceEncoding) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_get_encoding(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ proto string UConverter::getDestinationEncoding() */
static PHP_METHOD(UConverter, getDestinationEncoding) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_get_encoding(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
@@ -514,14 +512,14 @@ static void php_converter_do_get_type(php_converter_object *objval, UConverter *
/* {{{ proto int UConverter::getSourceType() */
static PHP_METHOD(UConverter, getSourceType) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_get_type(objval, objval->src, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ proto int UConverter::getDestinationType() */
static PHP_METHOD(UConverter, getDestinationType) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
php_converter_do_get_type(objval, objval->dest, INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
@@ -557,7 +555,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, __construct) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
char *src = "utf-8";
size_t src_len = sizeof("utf-8") - 1;
char *dest = src;
@@ -571,8 +569,8 @@ static PHP_METHOD(UConverter, __construct) {
php_converter_set_encoding(objval, &(objval->src), src, src_len );
php_converter_set_encoding(objval, &(objval->dest), dest, dest_len);
- php_converter_resolve_callback(getThis(), objval, "toUCallback", &(objval->to_cb), &(objval->to_cache));
- php_converter_resolve_callback(getThis(), objval, "fromUCallback", &(objval->from_cb), &(objval->from_cache));
+ php_converter_resolve_callback(ZEND_THIS, objval, "toUCallback", &(objval->to_cb), &(objval->to_cache));
+ php_converter_resolve_callback(ZEND_THIS, objval, "fromUCallback", &(objval->from_cb), &(objval->from_cache));
}
/* }}} */
@@ -582,7 +580,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_setSubstChars_arginfo, 0, ZEND_RETURN_VALUE
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, setSubstChars) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
char *chars;
size_t chars_len;
int ret = 1;
@@ -627,7 +625,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_getSubstChars_arginfo, 0, ZEND_RETURN_VALUE
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getSubstChars) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
char chars[127];
int8_t chars_len = sizeof(chars);
UErrorCode error = U_ZERO_ERROR;
@@ -750,7 +748,7 @@ ZEND_BEGIN_ARG_INFO_EX(php_converter_convert_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, convert) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
char *str;
size_t str_len;
zend_string *ret;
@@ -846,7 +844,7 @@ static PHP_METHOD(UConverter, transcode) {
ZEND_BEGIN_ARG_INFO_EX(php_converter_geterrorcode_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getErrorCode) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -862,7 +860,7 @@ static PHP_METHOD(UConverter, getErrorCode) {
ZEND_BEGIN_ARG_INFO_EX(php_converter_geterrormsg_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getErrorMessage) {
- php_converter_object *objval = CONV_GET(getThis());
+ php_converter_object *objval = CONV_GET(ZEND_THIS);
zend_string *message = intl_error_get_message(&(objval->error));
if (zend_parse_parameters_none() == FAILURE) {
@@ -969,7 +967,7 @@ static PHP_METHOD(UConverter, getStandards) {
/* }}} */
static const zend_function_entry php_converter_methods[] = {
- PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
+ PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC)
/* Encoding selection */
PHP_ME(UConverter, setSourceEncoding, php_converter_set_encoding_arginfo, ZEND_ACC_PUBLIC)
@@ -1142,12 +1140,3 @@ int php_converter_minit(INIT_FUNC_ARGS) {
return SUCCESS;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index fc2be15e1e..b923f70508 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -158,7 +158,7 @@ ZEND_END_ARG_INFO()
* Every 'IntlDateFormatter' class method has an entry in this table
*/
static const zend_function_entry IntlDateFormatter_class_functions[] = {
- PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype )
PHP_NAMED_FE( getTimeType, ZEND_FN( datefmt_get_timetype ), arginfo_intldateformatter_getdatetype )
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index b85f10ecc9..9268b9ddf5 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -36,10 +36,6 @@ extern "C" {
#include "dateformat_helpers.h"
#include "zend_exceptions.h"
-#if U_ICU_VERSION_MAJOR_NUM < 50
-#define UDAT_PATTERN 0
-#endif
-
#define INTL_UDATE_FMT_OK(i) \
(UDAT_FULL == (i) || UDAT_LONG == (i) || \
UDAT_MEDIUM == (i) || UDAT_SHORT == (i) || \
@@ -213,7 +209,7 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
/* return_value param is being changed, therefore we will always return
* NULL here */
- return_value = getThis();
+ return_value = ZEND_THIS;
if (datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
zend_string *err = intl_error_get_message(NULL);
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index a04ef1105e..af96095242 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -116,7 +116,7 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
/* Is in DST? */
isInDST = ucal_inDaylightTime(parsed_calendar , &INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : while checking if currently in DST." );
- add_assoc_long( return_value, CALENDAR_ISDST,(isInDST==1?1:0));
+ add_assoc_long( return_value, CALENDAR_ISDST,isInDST==1);
}
/* }}} */
diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c
index 7e0f0df68b..0ccd4b5cbe 100644
--- a/ext/intl/formatter/formatter.c
+++ b/ext/intl/formatter/formatter.c
@@ -26,10 +26,6 @@
#include "formatter_class.h"
#include "formatter_format.h"
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM <= 4
-#define UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL 17
-#endif
-
/* {{{ formatter_register_constants
* Register constants common for the both (OO and procedural)
* APIs.
@@ -58,11 +54,6 @@ void formatter_register_constants( INIT_FUNC_ARGS )
FORMATTER_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_STYLE", UNUM_DEFAULT );
-/* workaround for ICU bug */
-#if U_ICU_VERSION_MAJOR_NUM == 3 && U_ICU_VERSION_MINOR_NUM < 8
-#define UNUM_ROUND_HALFEVEN UNUM_FOUND_HALFEVEN
-#endif
-
/* UNumberFormatRoundingMode */
FORMATTER_EXPOSE_CLASS_CONST( ROUND_CEILING );
FORMATTER_EXPOSE_CLASS_CONST( ROUND_FLOOR );
@@ -141,12 +132,3 @@ void formatter_register_constants( INIT_FUNC_ARGS )
#undef FORMATTER_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c
index f6aa8d0d7e..b04c33eaad 100644
--- a/ext/intl/formatter/formatter_attr.c
+++ b/ext/intl/formatter/formatter_attr.c
@@ -446,12 +446,3 @@ PHP_FUNCTION( numfmt_get_locale )
RETURN_STRING(loc);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c
index d2356d5759..ad39f39392 100644
--- a/ext/intl/formatter/formatter_class.c
+++ b/ext/intl/formatter/formatter_class.c
@@ -151,7 +151,7 @@ ZEND_END_ARG_INFO()
* Every 'NumberFormatter' class method has an entry in this table
*/
static const zend_function_entry NumberFormatter_class_functions[] = {
- PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_numberformatter_format )
PHP_NAMED_FE( parse, ZEND_FN( numfmt_parse ), number_parse_arginfo )
@@ -191,12 +191,3 @@ void formatter_register_class( void )
NumberFormatter_handlers.free_obj = NumberFormatter_object_free;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_data.c b/ext/intl/formatter/formatter_data.c
index 46b94ad4ea..fec5320988 100644
--- a/ext/intl/formatter/formatter_data.c
+++ b/ext/intl/formatter/formatter_data.c
@@ -61,12 +61,3 @@ formatter_data* formatter_data_create( void )
return nf_data;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c
index f3253dcdb2..05ef6789ef 100644
--- a/ext/intl/formatter/formatter_format.c
+++ b/ext/intl/formatter/formatter_format.c
@@ -193,12 +193,3 @@ PHP_FUNCTION( numfmt_format_currency )
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c
index 28234043d5..a4671c093a 100644
--- a/ext/intl/formatter/formatter_main.c
+++ b/ext/intl/formatter/formatter_main.c
@@ -94,7 +94,7 @@ PHP_METHOD( NumberFormatter, __construct )
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
if (numfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
@@ -157,12 +157,3 @@ PHP_FUNCTION( numfmt_get_error_message )
RETURN_STR(message);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index 347f929cbd..a2a20f147d 100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -51,7 +51,7 @@ PHP_FUNCTION( numfmt_parse )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|lz/!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|lz!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -60,6 +60,11 @@ PHP_FUNCTION( numfmt_parse )
RETURN_FALSE;
}
+ if(zposition) {
+ position = (int32_t) zval_get_long(zposition);
+ position_p = &position;
+ }
+
/* Fetch the object. */
FORMATTER_METHOD_FETCH_OBJECT;
@@ -67,12 +72,6 @@ PHP_FUNCTION( numfmt_parse )
intl_convert_utf8_to_utf16(&sstr, &sstr_len, str, str_len, &INTL_DATA_ERROR_CODE(nfo));
INTL_METHOD_CHECK_STATUS( nfo, "String conversion to UTF-16 failed" );
- if(zposition) {
- ZVAL_DEREF(zposition);
- position = (int32_t)zval_get_long( zposition );
- position_p = &position;
- }
-
#if ICU_LOCALE_BUG && defined(LC_NUMERIC)
/* need to copy here since setlocale may change it later */
oldlocale = estrdup(setlocale(LC_NUMERIC, NULL));
@@ -106,8 +105,7 @@ PHP_FUNCTION( numfmt_parse )
efree(oldlocale);
#endif
if(zposition) {
- zval_ptr_dtor(zposition);
- ZVAL_LONG(zposition, position);
+ ZEND_TRY_ASSIGN_LONG(zposition, position);
}
if (sstr) {
@@ -138,7 +136,7 @@ PHP_FUNCTION( numfmt_parse_currency )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Osz/|z/!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Osz/|z!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &zcurrency, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -155,15 +153,13 @@ PHP_FUNCTION( numfmt_parse_currency )
INTL_METHOD_CHECK_STATUS( nfo, "String conversion to UTF-16 failed" );
if(zposition) {
- ZVAL_DEREF(zposition);
- position = (int32_t)zval_get_long( zposition );
+ position = (int32_t) zval_get_long(zposition);
position_p = &position;
}
number = unum_parseDoubleCurrency(FORMATTER_OBJECT(nfo), sstr, sstr_len, position_p, currency, &INTL_DATA_ERROR_CODE(nfo));
if(zposition) {
- zval_ptr_dtor(zposition);
- ZVAL_LONG(zposition, position);
+ ZEND_TRY_ASSIGN_LONG(zposition, position);
}
if (sstr) {
efree(sstr);
@@ -179,12 +175,3 @@ PHP_FUNCTION( numfmt_parse_currency )
RETVAL_DOUBLE( number );
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/grapheme/grapheme_string.c b/ext/intl/grapheme/grapheme_string.c
index a02fb7acd9..6e5fc4ffb4 100644
--- a/ext/intl/grapheme/grapheme_string.c
+++ b/ext/intl/grapheme/grapheme_string.c
@@ -24,9 +24,7 @@
#include "grapheme_util.h"
#include <unicode/utypes.h>
-#if U_ICU_VERSION_MAJOR_NUM >= 49
#include <unicode/utf8.h>
-#endif
#include <unicode/ucol.h>
#include <unicode/ustring.h>
#include <unicode/ubrk.h>
@@ -902,12 +900,3 @@ PHP_FUNCTION(grapheme_extract)
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: fdm=marker
- * vim: noet sw=4 ts=4
- */
diff --git a/ext/intl/grapheme/grapheme_util.c b/ext/intl/grapheme/grapheme_util.c
index 2e47b17933..5bc23be209 100644
--- a/ext/intl/grapheme/grapheme_util.c
+++ b/ext/intl/grapheme/grapheme_util.c
@@ -397,12 +397,3 @@ UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *stat
return ubrk_safeClone(global_break_iterator, stack_buffer, &buffer_size, status);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: fdm=marker
- * vim: noet sw=4 ts=4
- */
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index bd87afcd71..1bd0d069bf 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2009 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,10 +32,6 @@
#include "intl_convert.h"
/* }}} */
-#ifdef UIDNA_INFO_INITIALIZER
-#define HAVE_46_API 1 /* has UTS#46 API (introduced in ICU 4.6) */
-#endif
-
enum {
INTL_IDN_VARIANT_2003 = 0,
INTL_IDN_VARIANT_UTS46
@@ -58,8 +54,6 @@ void idn_register_constants( INIT_FUNC_ARGS )
/* Option to check if input conforms to STD-3 ASCII rules */
REGISTER_LONG_CONSTANT("IDNA_USE_STD3_RULES", UIDNA_USE_STD3_RULES, CONST_CS | CONST_PERSISTENT);
-#ifdef HAVE_46_API
-
/* Option to check for whether the input conforms to the BiDi rules.
* Ignored by the IDNA2003 implementation. (IDNA2003 always performs a BiDi check.) */
REGISTER_LONG_CONSTANT("IDNA_CHECK_BIDI", UIDNA_CHECK_BIDI, CONST_CS | CONST_PERSISTENT);
@@ -77,15 +71,11 @@ void idn_register_constants( INIT_FUNC_ARGS )
* By default, ToUnicode() uses transitional processing.
* Ignored by the IDNA2003 implementation. */
REGISTER_LONG_CONSTANT("IDNA_NONTRANSITIONAL_TO_UNICODE", UIDNA_NONTRANSITIONAL_TO_UNICODE, CONST_CS | CONST_PERSISTENT);
-#endif
/* VARIANTS */
REGISTER_LONG_CONSTANT("INTL_IDNA_VARIANT_2003", INTL_IDN_VARIANT_2003, CONST_CS | CONST_PERSISTENT);
-#ifdef HAVE_46_API
REGISTER_LONG_CONSTANT("INTL_IDNA_VARIANT_UTS46", INTL_IDN_VARIANT_UTS46, CONST_CS | CONST_PERSISTENT);
-#endif
-#ifdef HAVE_46_API
/* PINFO ERROR CODES */
REGISTER_LONG_CONSTANT("IDNA_ERROR_EMPTY_LABEL", UIDNA_ERROR_EMPTY_LABEL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IDNA_ERROR_LABEL_TOO_LONG", UIDNA_ERROR_LABEL_TOO_LONG, CONST_CS | CONST_PERSISTENT);
@@ -100,7 +90,6 @@ void idn_register_constants( INIT_FUNC_ARGS )
REGISTER_LONG_CONSTANT("IDNA_ERROR_INVALID_ACE_LABEL", UIDNA_ERROR_INVALID_ACE_LABEL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IDNA_ERROR_BIDI", UIDNA_ERROR_BIDI, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IDNA_ERROR_CONTEXTJ", UIDNA_ERROR_CONTEXTJ, CONST_CS | CONST_PERSISTENT);
-#endif
}
/* }}} */
@@ -131,7 +120,6 @@ static inline void php_intl_bad_args(const char *msg)
php_intl_idn_check_status(U_ILLEGAL_ARGUMENT_ERROR, msg);
}
-#ifdef HAVE_46_API
static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
const zend_string *domain, uint32_t option, int mode, zval *idna_info)
{
@@ -140,7 +128,6 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
int32_t len;
zend_string *buffer;
UIDNAInfo info = UIDNA_INFO_INITIALIZER;
- int buffer_used = 0;
uts46 = uidna_openUTS46(option, &status);
if (php_intl_idn_check_status(status, "failed to open UIDNA instance") == FAILURE) {
@@ -173,34 +160,21 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
ZSTR_LEN(buffer) = len;
if (info.errors == 0) {
- RETVAL_STR(buffer);
- buffer_used = 1;
+ RETVAL_STR_COPY(buffer);
} else {
RETVAL_FALSE;
}
if (idna_info) {
- if (buffer_used) { /* used in return_value then */
- zval_addref_p(return_value);
- add_assoc_zval_ex(idna_info, "result", sizeof("result")-1, return_value);
- } else {
- zval zv;
- ZVAL_NEW_STR(&zv, buffer);
- buffer_used = 1;
- add_assoc_zval_ex(idna_info, "result", sizeof("result")-1, &zv);
- }
+ add_assoc_str_ex(idna_info, "result", sizeof("result")-1, zend_string_copy(buffer));
add_assoc_bool_ex(idna_info, "isTransitionalDifferent",
sizeof("isTransitionalDifferent")-1, info.isTransitionalDifferent);
add_assoc_long_ex(idna_info, "errors", sizeof("errors")-1, (zend_long)info.errors);
}
- if (!buffer_used) {
- zend_string_efree(buffer);
- }
-
+ zend_string_release(buffer);
uidna_close(uts46);
}
-#endif
static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
const zend_string *domain, uint32_t option, int mode)
@@ -280,30 +254,22 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
zend_string *domain;
zend_long option = 0,
- variant = INTL_IDN_VARIANT_2003;
+ variant = INTL_IDN_VARIANT_UTS46;
zval *idna_info = NULL;
intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|llz/",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|llz",
&domain, &option, &variant, &idna_info) == FAILURE) {
php_intl_bad_args("bad arguments");
RETURN_NULL(); /* don't set FALSE because that's not the way it was before... */
}
-#ifdef HAVE_46_API
if (variant != INTL_IDN_VARIANT_2003 && variant != INTL_IDN_VARIANT_UTS46) {
php_intl_bad_args("invalid variant, must be one of {"
"INTL_IDNA_VARIANT_2003, INTL_IDNA_VARIANT_UTS46}");
RETURN_FALSE;
}
-#else
- if (variant != INTL_IDN_VARIANT_2003) {
- php_intl_bad_args("invalid variant, PHP was compiled against "
- "an old version of ICU and only supports INTL_IDN_VARIANT_2003");
- RETURN_FALSE;
- }
-#endif
if (ZSTR_LEN(domain) < 1) {
php_intl_bad_args("empty domain name");
@@ -325,19 +291,19 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
"4 arguments were provided, but INTL_IDNA_VARIANT_2003 only "
"takes 3 - extra argument ignored");
} else {
- zval_ptr_dtor(idna_info);
- array_init(idna_info);
+ idna_info = zend_try_array_init(idna_info);
+ if (!idna_info) {
+ return;
+ }
}
}
if (variant == INTL_IDN_VARIANT_2003) {
php_intl_idn_to(INTERNAL_FUNCTION_PARAM_PASSTHRU, domain, (uint32_t)option, mode);
}
-#ifdef HAVE_46_API
else {
php_intl_idn_to_46(INTERNAL_FUNCTION_PARAM_PASSTHRU, domain, (uint32_t)option, mode, idna_info);
}
-#endif
}
/* {{{ proto string idn_to_ascii(string domain[, int options[, int variant[, array &idna_info]]])
@@ -356,13 +322,3 @@ PHP_FUNCTION(idn_to_utf8)
php_intl_idn_handoff(INTERNAL_FUNCTION_PARAM_PASSTHRU, INTL_IDN_TO_UTF8);
}
/* }}} */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: fdm=marker
- * vim: noet sw=4 ts=4
- */
diff --git a/ext/intl/idn/idn.h b/ext/intl/idn/idn.h
index 80459c2f6b..e8d1b53a33 100644
--- a/ext/intl/idn/idn.h
+++ b/ext/intl/idn/idn.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2009 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/intl/intl_convert.c b/ext/intl/intl_convert.c
index eadcf2c9f1..e24f2370c2 100644
--- a/ext/intl/intl_convert.c
+++ b/ext/intl/intl_convert.c
@@ -152,12 +152,3 @@ zend_string* intl_convert_utf16_to_utf8(
return dst;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/intl_error.c b/ext/intl/intl_error.c
index d802eb9c26..bdab00cf27 100644
--- a/ext/intl/intl_error.c
+++ b/ext/intl/intl_error.c
@@ -315,12 +315,3 @@ smart_str intl_parse_error_to_string( UParseError* pe )
smart_str_0( &ret );
return ret;
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/locale/locale.c b/ext/intl/locale/locale.c
index 44626f5043..fa796e3574 100644
--- a/ext/intl/locale/locale.c
+++ b/ext/intl/locale/locale.c
@@ -59,12 +59,3 @@ void locale_register_constants( INIT_FUNC_ARGS )
#undef LOCALE_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c
index 9d4799bf27..eb797c505d 100644
--- a/ext/intl/locale/locale_class.c
+++ b/ext/intl/locale/locale_class.c
@@ -116,12 +116,3 @@ void locale_register_Locale_class( void )
}
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c
index d710e1926a..f03aa72928 100644
--- a/ext/intl/locale/locale_methods.c
+++ b/ext/intl/locale/locale_methods.c
@@ -340,7 +340,7 @@ static zend_string* get_icu_value_internal( const char* loc_name , char* tag_nam
continue;
}
- /* Error in retriving data */
+ /* Error in retrieving data */
*result = 0;
if( tag_value ){
zend_string_release_ex( tag_value, 0 );
@@ -1517,12 +1517,12 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
/* }}} */
/* {{{ proto string Locale::lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])
-* Searchs the items in $langtag for the best match to the language
+* Searches the items in $langtag for the best match to the language
* range
*/
/* }}} */
/* {{{ proto string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])
-* Searchs the items in $langtag for the best match to the language
+* Searches the items in $langtag for the best match to the language
* range
*/
PHP_FUNCTION(locale_lookup)
@@ -1629,13 +1629,3 @@ PHP_FUNCTION(locale_accept_from_http)
RETURN_STRINGL(resultLocale, len);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- *can_loc_len
-*/
diff --git a/ext/intl/msgformat/msgformat.c b/ext/intl/msgformat/msgformat.c
index 3f5af5fd67..2439b5855a 100644
--- a/ext/intl/msgformat/msgformat.c
+++ b/ext/intl/msgformat/msgformat.c
@@ -113,7 +113,7 @@ PHP_METHOD( MessageFormatter, __construct )
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
if (msgfmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
@@ -178,12 +178,3 @@ PHP_FUNCTION( msgfmt_get_error_message )
RETURN_STR(message);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_attr.c b/ext/intl/msgformat/msgformat_attr.c
index 78eb727c61..51d9df049f 100644
--- a/ext/intl/msgformat/msgformat_attr.c
+++ b/ext/intl/msgformat/msgformat_attr.c
@@ -140,12 +140,3 @@ PHP_FUNCTION( msgfmt_get_locale )
RETURN_STRING(loc);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index 8501a2fe65..a6d5b593a6 100644
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -125,7 +125,7 @@ ZEND_END_ARG_INFO()
* Every 'MessageFormatter' class method has an entry in this table
*/
static const zend_function_entry MessageFormatter_class_functions[] = {
- PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC )
ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_messageformatter_format )
ZEND_FENTRY( formatMessage, ZEND_FN( msgfmt_format_message ), arginfo_messageformatter_formatmessage, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
@@ -159,12 +159,3 @@ void msgformat_register_class( void )
MessageFormatter_handlers.free_obj = MessageFormatter_object_free;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_class.h b/ext/intl/msgformat/msgformat_class.h
index 6823595f6d..51025f0671 100644
--- a/ext/intl/msgformat/msgformat_class.h
+++ b/ext/intl/msgformat/msgformat_class.h
@@ -25,10 +25,6 @@
#include "../intl_error.h"
#include "../intl_data.h"
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM < 48
-# define MSG_FORMAT_QUOTE_APOS 1
-#endif
-
#include "msgformat_data.h"
typedef struct {
diff --git a/ext/intl/msgformat/msgformat_data.c b/ext/intl/msgformat/msgformat_data.c
index e2510e16b8..03dc232f67 100644
--- a/ext/intl/msgformat/msgformat_data.c
+++ b/ext/intl/msgformat/msgformat_data.c
@@ -98,13 +98,3 @@ int msgformat_fix_quotes(UChar **spattern, uint32_t *spattern_len, UErrorCode *e
return SUCCESS;
}
#endif
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_format.c b/ext/intl/msgformat/msgformat_format.c
index e833781c79..a11c167a4b 100644
--- a/ext/intl/msgformat/msgformat_format.c
+++ b/ext/intl/msgformat/msgformat_format.c
@@ -148,12 +148,3 @@ PHP_FUNCTION( msgfmt_format_message )
msgformat_data_free(&mfo->mf_data);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp
index f8e3273f5d..dcc74283b2 100644
--- a/ext/intl/msgformat/msgformat_helpers.cpp
+++ b/ext/intl/msgformat/msgformat_helpers.cpp
@@ -44,11 +44,6 @@ extern "C" {
#include "../timezone/timezone_class.h"
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
-#define HAS_MESSAGE_PATTERN 1
-#define HAS_MISALLOCATE_MEMORY_BUG 1
-#endif
-
U_NAMESPACE_BEGIN
/**
* This class isolates our access to private internal methods of
@@ -59,9 +54,7 @@ class MessageFormatAdapter {
public:
static const Formattable::Type* getArgTypeList(const MessageFormat& m,
int32_t& count);
-#ifdef HAS_MESSAGE_PATTERN
static const MessagePattern getMessagePattern(MessageFormat* m);
-#endif
};
const Formattable::Type*
@@ -70,21 +63,17 @@ MessageFormatAdapter::getArgTypeList(const MessageFormat& m,
return m.getArgTypeList(count);
}
-#ifdef HAS_MESSAGE_PATTERN
const MessagePattern
MessageFormatAdapter::getMessagePattern(MessageFormat* m) {
return m->msgPattern;
}
-#endif
U_NAMESPACE_END
using icu::Formattable;
using icu::Format;
using icu::DateFormat;
using icu::MessageFormat;
-#ifdef HAS_MESSAGE_PATTERN
using icu::MessagePattern;
-#endif
using icu::MessageFormatAdapter;
using icu::FieldPosition;
@@ -139,7 +128,6 @@ static HashTable *umsg_get_numeric_types(MessageFormatter_object *mfo,
return ret;
}
-#ifdef HAS_MESSAGE_PATTERN
static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
const MessagePattern& mp,
intl_error& err)
@@ -266,10 +254,8 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
type = Formattable::kDouble;
} else if (argType == UMSGPAT_ARG_TYPE_SELECT) {
type = Formattable::kString;
-#if U_ICU_VERSION_MAJOR_NUM >= 50
} else if (argType == UMSGPAT_ARG_TYPE_SELECTORDINAL) {
type = Formattable::kDouble;
-#endif
} else {
type = Formattable::kString;
}
@@ -296,26 +282,15 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo,
return ret;
}
-#endif
static HashTable *umsg_get_types(MessageFormatter_object *mfo,
intl_error& err)
{
MessageFormat *mf = (MessageFormat *)mfo->mf_data.umsgf;
-#ifdef HAS_MESSAGE_PATTERN
const MessagePattern mp = MessageFormatAdapter::getMessagePattern(mf);
return umsg_parse_format(mfo, mp, err);
-#else
- if (mf->usesNamedArguments()) {
- intl_errors_set(&err, U_UNSUPPORTED_ERROR,
- "This extension supports named arguments only on ICU 4.8+",
- 0);
- return NULL;
- }
- return umsg_get_numeric_types(mfo, err);
-#endif
}
static void umsg_set_timezone(MessageFormatter_object *mfo,
@@ -335,7 +310,6 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
return; /* already done */
}
-#ifdef HAS_MISALLOCATE_MEMORY_BUG
/* There is a bug in ICU which prevents MessageFormatter::getFormats()
to handle more than 10 formats correctly. The enumerator could be
used to walk through the present formatters using getFormat(), which
@@ -353,7 +327,6 @@ static void umsg_set_timezone(MessageFormatter_object *mfo,
if (count > 10) {
return;
}
-#endif
formats = mf->getFormats(count);
@@ -702,12 +675,3 @@ U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UCh
}
delete[] fargs;
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index 8562a76e92..c517288bff 100644
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
@@ -152,12 +152,3 @@ PHP_FUNCTION( msgfmt_parse_message )
msgformat_data_free(&mfo->mf_data);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/normalizer/normalizer.c b/ext/intl/normalizer/normalizer.c
index 3c49fe584b..e05c45875b 100644
--- a/ext/intl/normalizer/normalizer.c
+++ b/ext/intl/normalizer/normalizer.c
@@ -61,12 +61,3 @@ void normalizer_register_constants( INIT_FUNC_ARGS )
#undef NORMALIZER_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c
index 5168b929ab..4e46b2e279 100644
--- a/ext/intl/normalizer/normalizer_class.c
+++ b/ext/intl/normalizer/normalizer_class.c
@@ -78,12 +78,3 @@ void normalizer_register_Normalizer_class( void )
}
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/normalizer/normalizer_normalize.c b/ext/intl/normalizer/normalizer_normalize.c
index 72b848e487..f8336d0101 100644
--- a/ext/intl/normalizer/normalizer_normalize.c
+++ b/ext/intl/normalizer/normalizer_normalize.c
@@ -28,9 +28,7 @@
#include "normalizer_class.h"
#include "normalizer_normalize.h"
#include "intl_convert.h"
-#if U_ICU_VERSION_MAJOR_NUM >= 49
#include <unicode/utf8.h>
-#endif
#if U_ICU_VERSION_MAJOR_NUM >= 56
@@ -390,12 +388,3 @@ PHP_FUNCTION( normalizer_get_raw_decomposition )
}
#endif
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index dc028918b0..b244a29842 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -87,12 +87,10 @@
#include "idn/idn.h"
#include "uchar/uchar.h"
-#if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
# include "spoofchecker/spoofchecker_class.h"
# include "spoofchecker/spoofchecker.h"
# include "spoofchecker/spoofchecker_create.h"
# include "spoofchecker/spoofchecker_main.h"
-#endif
#include "msgformat/msgformat.h"
#include "common/common_error.h"
@@ -763,18 +761,12 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intltz_create_default, arginfo_tz_void )
PHP_FE( intltz_get_id, arginfo_tz_only_tz )
PHP_FE( intltz_get_gmt, arginfo_tz_void )
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_FE( intltz_get_unknown, arginfo_tz_void )
-#endif
PHP_FE( intltz_create_enumeration, arginfo_tz_create_enumeration )
PHP_FE( intltz_count_equivalent_ids, arginfo_tz_idarg_static )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_FE( intltz_create_time_zone_id_enumeration, arginfo_tz_create_time_zone_id_enumeration )
-#endif
PHP_FE( intltz_get_canonical_id, arginfo_tz_get_canonical_id )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_FE( intltz_get_region, arginfo_tz_idarg_static )
-#endif
PHP_FE( intltz_get_tz_data_version, arginfo_tz_void )
PHP_FE( intltz_get_equivalent_id, arginfo_tz_get_equivalent_id )
PHP_FE( intltz_use_daylight_time, arginfo_tz_only_tz )
@@ -788,9 +780,7 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intltz_get_error_message, arginfo_tz_only_tz )
PHP_FE( intlcal_create_instance, ainfo_cal_create_instance )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
PHP_FE( intlcal_get_keyword_values_for_locale, ainfo_cal_get_keyword_values_for_locale )
-#endif
PHP_FE( intlcal_get_now, ainfo_cal_void )
PHP_FE( intlcal_get_available_locales, ainfo_cal_void )
PHP_FE( intlcal_get, ainfo_cal_field )
@@ -806,9 +796,7 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intlcal_field_difference, ainfo_cal_field_difference )
PHP_FE( intlcal_get_actual_maximum, ainfo_cal_field )
PHP_FE( intlcal_get_actual_minimum, ainfo_cal_field )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_get_day_of_week_type, ainfo_cal_dow )
-#endif
PHP_FE( intlcal_get_first_day_of_week, ainfo_cal_only_cal )
PHP_FE( intlcal_get_greatest_minimum, ainfo_cal_field )
PHP_FE( intlcal_get_least_maximum, ainfo_cal_field )
@@ -818,28 +806,22 @@ static const zend_function_entry intl_functions[] = {
PHP_FE( intlcal_get_minimum, ainfo_cal_field )
PHP_FE( intlcal_get_time_zone, ainfo_cal_only_cal )
PHP_FE( intlcal_get_type, ainfo_cal_only_cal )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_get_weekend_transition, ainfo_cal_dow )
-#endif
PHP_FE( intlcal_in_daylight_time, ainfo_cal_only_cal )
PHP_FE( intlcal_is_equivalent_to, ainfo_cal_other_cal )
PHP_FE( intlcal_is_lenient, ainfo_cal_only_cal )
PHP_FE( intlcal_is_set, ainfo_cal_field )
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
PHP_FE( intlcal_is_weekend, ainfo_cal_date_optional )
-#endif
PHP_FE( intlcal_set_first_day_of_week, ainfo_cal_dow )
PHP_FE( intlcal_set_lenient, ainfo_cal_set_lenient )
PHP_FE( intlcal_set_minimal_days_in_first_week, ainfo_cal_set_minimal_days_in_first_week )
PHP_FE( intlcal_equals, ainfo_cal_other_cal )
PHP_FE( intlcal_from_date_time, ainfo_cal_from_date_time )
PHP_FE( intlcal_to_date_time, ainfo_cal_only_cal )
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_FE( intlcal_get_repeated_wall_time_option, ainfo_cal_only_cal )
PHP_FE( intlcal_get_skipped_wall_time_option, ainfo_cal_only_cal )
PHP_FE( intlcal_set_repeated_wall_time_option, ainfo_cal_wall_time_option )
PHP_FE( intlcal_set_skipped_wall_time_option, ainfo_cal_wall_time_option )
-#endif
PHP_FE( intlcal_get_error_code, ainfo_cal_only_cal )
PHP_FE( intlcal_get_error_message, ainfo_cal_only_cal )
@@ -972,13 +954,11 @@ PHP_MINIT_FUNCTION( intl )
/* Expose IDN constants to PHP scripts. */
idn_register_constants(INIT_FUNC_ARGS_PASSTHRU);
-#if U_ICU_VERSION_MAJOR_NUM * 1000 + U_ICU_VERSION_MINOR_NUM >= 4002
/* Register 'Spoofchecker' PHP class */
spoofchecker_register_Spoofchecker_class( );
/* Expose Spoofchecker constants to PHP scripts */
spoofchecker_register_constants( INIT_FUNC_ARGS_PASSTHRU );
-#endif
/* Register 'IntlException' PHP class */
intl_register_IntlException_class( );
@@ -1077,12 +1057,3 @@ PHP_MINFO_FUNCTION( intl )
DISPLAY_INI_ENTRIES() ;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h
index 6d8f46adec..6b910d76c8 100644
--- a/ext/intl/php_intl.h
+++ b/ext/intl/php_intl.h
@@ -74,12 +74,3 @@ const char *intl_locale_get_default( void );
#define PHP_INTL_VERSION PHP_VERSION
#endif /* PHP_INTL_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/resourcebundle/resourcebundle.c b/ext/intl/resourcebundle/resourcebundle.c
index fc6ecb946c..5c3bc1742e 100644
--- a/ext/intl/resourcebundle/resourcebundle.c
+++ b/ext/intl/resourcebundle/resourcebundle.c
@@ -81,12 +81,3 @@ void resourcebundle_extract_value( zval *return_value, ResourceBundle_object *so
}
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index 5b142a54d1..2feb6edb13 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -152,7 +152,7 @@ PHP_METHOD( ResourceBundle, __construct )
zend_error_handling error_handling;
zend_replace_error_handling(EH_THROW, IntlException_ce_ptr, &error_handling);
- return_value = getThis();
+ return_value = ZEND_THIS;
if (resourcebundle_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1) == FAILURE) {
if (!EG(exception)) {
zend_throw_exception(IntlException_ce_ptr, "Constructor failed", 0);
@@ -423,7 +423,7 @@ PHP_FUNCTION( resourcebundle_get_error_message )
* Every 'ResourceBundle' class method has an entry in this table
*/
static const zend_function_entry ResourceBundle_class_functions[] = {
- PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
+ PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC )
ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_resourcebundle_get, ZEND_ACC_PUBLIC )
ZEND_NAMED_ME( count, ZEND_FN(resourcebundle_count), arginfo_resourcebundle_count, ZEND_ACC_PUBLIC )
@@ -458,12 +458,3 @@ void resourcebundle_register_class( void )
zend_class_implements(ResourceBundle_ce_ptr, 1, zend_ce_traversable);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/resourcebundle/resourcebundle_iterator.c b/ext/intl/resourcebundle/resourcebundle_iterator.c
index 07cfc7bc0d..b51f43f22b 100644
--- a/ext/intl/resourcebundle/resourcebundle_iterator.c
+++ b/ext/intl/resourcebundle/resourcebundle_iterator.c
@@ -175,12 +175,3 @@ zend_object_iterator *resourcebundle_get_iterator( zend_class_entry *ce, zval *o
return (zend_object_iterator *) iterator;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/spoofchecker/spoofchecker.c b/ext/intl/spoofchecker/spoofchecker.c
index 221b69ee5b..607576a2bf 100644
--- a/ext/intl/spoofchecker/spoofchecker.c
+++ b/ext/intl/spoofchecker/spoofchecker.c
@@ -57,12 +57,3 @@ void spoofchecker_register_constants(INIT_FUNC_ARGS)
#undef SPOOFCHECKER_EXPOSE_CLASS_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c
index f24eed3869..d8bca44dba 100644
--- a/ext/intl/spoofchecker/spoofchecker_class.c
+++ b/ext/intl/spoofchecker/spoofchecker_class.c
@@ -96,7 +96,7 @@ ZEND_END_ARG_INFO()
*/
static const zend_function_entry Spoofchecker_class_functions[] = {
- PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+ PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, isSuspicious, spoofchecker_is_suspicous, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, areConfusable, spoofchecker_are_confusable, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, setAllowedLocales, spoofchecker_set_allowed_locales, ZEND_ACC_PUBLIC)
@@ -183,12 +183,3 @@ void spoofchecker_object_destroy(Spoofchecker_object* co)
intl_error_reset(SPOOFCHECKER_ERROR_P(co));
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/spoofchecker/spoofchecker_class.h b/ext/intl/spoofchecker/spoofchecker_class.h
index c0cb0c5327..ba4cc497a1 100644
--- a/ext/intl/spoofchecker/spoofchecker_class.h
+++ b/ext/intl/spoofchecker/spoofchecker_class.h
@@ -57,7 +57,7 @@ extern zend_class_entry *Spoofchecker_ce_ptr;
/* Auxiliary macros */
#define SPOOFCHECKER_METHOD_INIT_VARS \
- zval* object = getThis(); \
+ zval* object = ZEND_THIS; \
Spoofchecker_object* co = NULL; \
intl_error_reset(NULL); \
diff --git a/ext/intl/spoofchecker/spoofchecker_create.c b/ext/intl/spoofchecker/spoofchecker_create.c
index f667f731f0..999b6af147 100644
--- a/ext/intl/spoofchecker/spoofchecker_create.c
+++ b/ext/intl/spoofchecker/spoofchecker_create.c
@@ -65,12 +65,3 @@ PHP_METHOD(Spoofchecker, __construct)
zend_restore_error_handling(&error_handling);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/spoofchecker/spoofchecker_main.c b/ext/intl/spoofchecker/spoofchecker_main.c
index d41a9ae9cc..072ed24b7e 100644
--- a/ext/intl/spoofchecker/spoofchecker_main.c
+++ b/ext/intl/spoofchecker/spoofchecker_main.c
@@ -163,12 +163,3 @@ PHP_METHOD(Spoofchecker, setRestrictionLevel)
}
/* }}} */
#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/tests/breakiter___construct_error.phpt b/ext/intl/tests/breakiter___construct_error.phpt
index e05aa6196b..595c6b283a 100644
--- a/ext/intl/tests/breakiter___construct_error.phpt
+++ b/ext/intl/tests/breakiter___construct_error.phpt
@@ -2,7 +2,6 @@
IntlRuleBasedBreakIterator::__construct(): arg errors
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/bug62070.phpt b/ext/intl/tests/bug62070.phpt
index 645c32d9aa..612e851a75 100644
--- a/ext/intl/tests/bug62070.phpt
+++ b/ext/intl/tests/bug62070.phpt
@@ -2,7 +2,6 @@
Bug #62070: Collator::getSortKey() returns garbage
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
-<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU >= 49'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/bug74484_MessageFormatter.phpt b/ext/intl/tests/bug74484_MessageFormatter.phpt
index d3b29a58a4..b48de33525 100644
--- a/ext/intl/tests/bug74484_MessageFormatter.phpt
+++ b/ext/intl/tests/bug74484_MessageFormatter.phpt
@@ -4,8 +4,6 @@ Bug #74484 MessageFormatter::formatMessage memory corruption with 11+ named plac
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
?>
--FILE--
<?php
diff --git a/ext/intl/tests/bug76942_MessageFormatter.phpt b/ext/intl/tests/bug76942_MessageFormatter.phpt
deleted file mode 100644
index baafb00ced..0000000000
--- a/ext/intl/tests/bug76942_MessageFormatter.phpt
+++ /dev/null
@@ -1,33 +0,0 @@
---TEST--
-Bug #76942 U_ARGUMENT_TYPE_MISMATCH
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
-?>
---FILE--
-<?php
-
-$locale = 'nl';
-$message = '{0,number,#,###.##} MB';
-$vars = [
- 7.1234
-];
-
-$formatter = new MessageFormatter($locale, $message);
-if (!$formatter) {
- throw new Exception(intl_get_error_message(), intl_get_error_code());
-}
-
-$result = $formatter->format($vars);
-if ($result === false) {
- throw new Exception($formatter->getErrorMessage(), $formatter->getErrorCode());
-}
-
-var_dump($result);
-
-?>
-==DONE==
---EXPECT--
-string(7) "7,12 MB"
-==DONE==
diff --git a/ext/intl/tests/calendar_createInstance_basic.phpt b/ext/intl/tests/calendar_createInstance_basic.phpt
index a94a9ff261..00a68e620b 100644
--- a/ext/intl/tests/calendar_createInstance_basic.phpt
+++ b/ext/intl/tests/calendar_createInstance_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::createInstance() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_createInstance_variation1.phpt b/ext/intl/tests/calendar_createInstance_variation1.phpt
index 138f2a2afd..74ec910587 100644
--- a/ext/intl/tests/calendar_createInstance_variation1.phpt
+++ b/ext/intl/tests/calendar_createInstance_variation1.phpt
@@ -4,8 +4,6 @@ IntlCalendar::createInstance() argument variations
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -81,4 +79,4 @@ IntlTimeZone Object
[currentOffset] => %d
)
pt
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt
index 618fcdb0d4..527c0ff140 100644
--- a/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt
+++ b/ext/intl/tests/calendar_getDayOfWeekType_basic.phpt
@@ -6,8 +6,8 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0)
- die('skip for ICU >= 4.4 and ICU < 52.1');
+if (version_compare(INTL_ICU_VERSION, '52.1') >= 0)
+ die('skip for ICU < 52.1');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
index c86f54f246..46fe17d9cd 100644
--- a/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
+++ b/ext/intl/tests/calendar_getDayOfWeekType_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
- die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt
index dedfcea8fe..e44185b433 100644
--- a/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt
+++ b/ext/intl/tests/calendar_getKeywordValuesForLocale_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getKeywordValuesForLocale() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.2') < 0)
- die('skip for ICU 4.2+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -33,4 +31,4 @@ Array
bool(true)
bool(true)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
index 39a4265006..717c435be7 100644
--- a/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
+++ b/ext/intl/tests/calendar_getKeywordValuesForLocale_error.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getKeywordValuesForLocale(): bad arguments
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.2') < 0)
- die('skip for ICU 4.2+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_getLocale_basic.phpt b/ext/intl/tests/calendar_getLocale_basic.phpt
index 63f846f9a8..1692c2d20b 100644
--- a/ext/intl/tests/calendar_getLocale_basic.phpt
+++ b/ext/intl/tests/calendar_getLocale_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getLocale() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -19,4 +17,4 @@ var_dump(intlcal_get_locale($intlcal, Locale::VALID_LOCALE));
--EXPECT--
string(2) "nl"
string(5) "nl_NL"
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt
index eeaa3104a8..6082830a8b 100644
--- a/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt
+++ b/ext/intl/tests/calendar_getMinimalDaysInFirstWeek_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getMinimalDaysInFirstWeek() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -19,4 +17,4 @@ var_dump(intlcal_get_minimal_days_in_first_week($intlcal));
--EXPECT--
int(4)
int(4)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
index baaa27668f..06aa679c5a 100644
--- a/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_getSkipped_RepeatedWallTimeOption_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_getTimeZone_basic.phpt b/ext/intl/tests/calendar_getTimeZone_basic.phpt
index fd9aff1f99..612796be0b 100644
--- a/ext/intl/tests/calendar_getTimeZone_basic.phpt
+++ b/ext/intl/tests/calendar_getTimeZone_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getTimeZone() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -31,4 +29,4 @@ IntlTimeZone Object
[rawOffset] => 60000
[currentOffset] => 60000
)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getWeekendTransition_basic.phpt b/ext/intl/tests/calendar_getWeekendTransition_basic.phpt
index e725743006..3afbdd4ba3 100644
--- a/ext/intl/tests/calendar_getWeekendTransition_basic.phpt
+++ b/ext/intl/tests/calendar_getWeekendTransition_basic.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
- die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -21,4 +19,4 @@ var_dump(intlcal_get_weekend_transition($intlcal, IntlCalendar::DOW_SUNDAY));
--EXPECT--
int(86400000)
int(86400000)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_getWeekendTransition_error.phpt b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
index 4d0518d733..d61c9d5a25 100644
--- a/ext/intl/tests/calendar_getWeekendTransition_error.phpt
+++ b/ext/intl/tests/calendar_getWeekendTransition_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
- die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt b/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt
index af172ce092..59ad43647c 100644
--- a/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt
+++ b/ext/intl/tests/calendar_get_setRepeatedWallTimeOption_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::get/setRepeatedWallTimeOption(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt b/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt
index f421005c34..94f540abb1 100644
--- a/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt
+++ b/ext/intl/tests/calendar_get_setSkippedWallTimeOption_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::get/setSkippedWallTimeOption(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_isWeekend_basic.phpt b/ext/intl/tests/calendar_isWeekend_basic.phpt
index d6452c71f7..ba9bbefb2c 100644
--- a/ext/intl/tests/calendar_isWeekend_basic.phpt
+++ b/ext/intl/tests/calendar_isWeekend_basic.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
- die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -23,4 +21,4 @@ var_dump($intlcal->isWeekend(strtotime('2012-03-11 12:00:00 +0000') * 1000));
bool(false)
bool(false)
bool(true)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/calendar_isWeekend_error.phpt b/ext/intl/tests/calendar_isWeekend_error.phpt
index 104fba4447..c1f8180fa3 100644
--- a/ext/intl/tests/calendar_isWeekend_error.phpt
+++ b/ext/intl/tests/calendar_isWeekend_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
- die('skip for ICU 4.4+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
index 69651da4e0..776cb8b825 100644
--- a/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
+++ b/ext/intl/tests/calendar_setSkipped_RepeatedWallTimeOption_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/calendar_setTimeZone_basic.phpt b/ext/intl/tests/calendar_setTimeZone_basic.phpt
index 525840ddd6..006df2b468 100644
--- a/ext/intl/tests/calendar_setTimeZone_basic.phpt
+++ b/ext/intl/tests/calendar_setTimeZone_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::setTimeZone() basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -36,4 +34,4 @@ GMT
int(0)
GMT+05:30
int(19800000)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/collator_create.phpt b/ext/intl/tests/collator_create.phpt
deleted file mode 100644
index 1607d41a00..0000000000
--- a/ext/intl/tests/collator_create.phpt
+++ /dev/null
@@ -1,82 +0,0 @@
---TEST--
-create() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try creating collator with different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $locales = array(
- 'EN-US-ODESSA',
- 'UK_UA_ODESSA',
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- '',
- 'root',
- 'uk@currency=EURO',
- '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799'
- );
-
- foreach( $locales as $locale )
- {
- // Create Collator with the current locale.
- $coll = ut_coll_create( $locale );
- if( !is_object($coll) )
- {
- $res_str .= "Error creating collator with '$locale' locale: " .
- intl_get_error_message() . "\n";
- continue;
- }
-
- // Get the requested, valid and actual locales.
- $vloc = ut_coll_get_locale( $coll, Locale::VALID_LOCALE );
- $aloc = ut_coll_get_locale( $coll, Locale::ACTUAL_LOCALE );
-
- // Show them.
- $res_str .= "Locale: '$locale'\n" .
- " ULOC_REQUESTED_LOCALE = '$locale'\n" .
- " ULOC_VALID_LOCALE = '$vloc'\n" .
- " ULOC_ACTUAL_LOCALE = '$aloc'\n";
- }
-
- return $res_str;
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTF--
-Locale: 'EN-US-ODESSA'
- ULOC_REQUESTED_LOCALE = 'EN-US-ODESSA'
- ULOC_VALID_LOCALE = 'en_US'
- ULOC_ACTUAL_LOCALE = 'en'
-Locale: 'UK_UA_ODESSA'
- ULOC_REQUESTED_LOCALE = 'UK_UA_ODESSA'
- ULOC_VALID_LOCALE = 'uk_UA'
- ULOC_ACTUAL_LOCALE = 'uk'
-Locale: 'uk-ua_CALIFORNIA@currency=;currency=GRN'
- ULOC_REQUESTED_LOCALE = 'uk-ua_CALIFORNIA@currency=;currency=GRN'
- ULOC_VALID_LOCALE = 'uk_UA'
- ULOC_ACTUAL_LOCALE = 'uk'
-Locale: ''
- ULOC_REQUESTED_LOCALE = ''
- ULOC_VALID_LOCALE = '%s'
- ULOC_ACTUAL_LOCALE = '%s'
-Locale: 'root'
- ULOC_REQUESTED_LOCALE = 'root'
- ULOC_VALID_LOCALE = 'root'
- ULOC_ACTUAL_LOCALE = 'root'
-Locale: 'uk@currency=EURO'
- ULOC_REQUESTED_LOCALE = 'uk@currency=EURO'
- ULOC_VALID_LOCALE = 'uk'
- ULOC_ACTUAL_LOCALE = 'uk'
-Error creating collator with '12345678911131517192123252729313335373941434547495153575961636567697173757779818385878991939597991234567891113151719212325272931333537394143454749515357596163656769717375777981838587899193959799' locale: Locale string too long, should be no longer than %d characters: U_ILLEGAL_ARGUMENT_ERROR
diff --git a/ext/intl/tests/collator_create2.phpt b/ext/intl/tests/collator_create2.phpt
index 60f818e9ee..292e3cebb5 100644
--- a/ext/intl/tests/collator_create2.phpt
+++ b/ext/intl/tests/collator_create2.phpt
@@ -2,7 +2,6 @@
create() icu >= 4.8 && icu < 53.1
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip for ICU >= 4.8'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '53.1') >= 0) die('skip for ICU < 53.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_locale.phpt b/ext/intl/tests/collator_get_locale.phpt
deleted file mode 100644
index e71a020b4b..0000000000
--- a/ext/intl/tests/collator_get_locale.phpt
+++ /dev/null
@@ -1,53 +0,0 @@
---TEST--
-get_locale() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---INI--
-precision=6
---FILE--
-<?php
-
-/*
- * Try to specify valid and invalid locale types when getting locale.
- */
-
-function ut_main()
-{
- $locales = array(
- Locale::VALID_LOCALE,
- Locale::ACTUAL_LOCALE,
- 100,
- -100,
- -9999999999999,
- 9999999999999,
- 1.2,
- );
-
- $coll = ut_coll_create( 'en_US' );
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $rc = ut_coll_get_locale( $coll, $locale );
-
- $res_str .= sprintf(
- "Locale of type %s is %s\n",
- dump( $locale ),
- dump( $rc ) );
- }
-
- return $res_str . "\n";
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-?>
---EXPECT--
-Locale of type 1 is 'en_US'
-Locale of type 0 is 'en'
-Locale of type 100 is false
-Locale of type -100 is false
-Locale of type -9999999999999 is false
-Locale of type 9999999999999 is false
-Locale of type 1.2 is 'en_US'
diff --git a/ext/intl/tests/collator_get_locale2.phpt b/ext/intl/tests/collator_get_locale2.phpt
index 944f42ec3e..e579c015e5 100644
--- a/ext/intl/tests/collator_get_locale2.phpt
+++ b/ext/intl/tests/collator_get_locale2.phpt
@@ -2,7 +2,6 @@
get_locale() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU 4.8+ only'; ?>
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/collator_get_sort_key.phpt b/ext/intl/tests/collator_get_sort_key.phpt
index ad0d13e502..62cc3a7b11 100644
--- a/ext/intl/tests/collator_get_sort_key.phpt
+++ b/ext/intl/tests/collator_get_sort_key.phpt
@@ -2,7 +2,6 @@
collator_get_sort_key()
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
<?php /* XXX Obviously it fails somewhere between >= 4.8 and < 51.2 */
if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?>
--FILE--
diff --git a/ext/intl/tests/dateformat_clone.phpt b/ext/intl/tests/dateformat_clone.phpt
deleted file mode 100644
index 2a98ff30cd..0000000000
--- a/ext/intl/tests/dateformat_clone.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-Cloning datefmt icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-include_once( 'ut_common.inc' );
-$GLOBALS['oo-mode'] = true;
-$res_str = '';
-/*
- * Clone
- */
-$start_pattern = 'dd-MM-YY';
-$fmt = ut_datefmt_create( "en-US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern );
-
-$formatted = ut_datefmt_format($fmt,0);
-$res_str .= "\nResult of formatting timestamp=0 is : \n$formatted";
-
-$fmt_clone = clone $fmt;
-ut_datefmt_set_pattern( $fmt , 'yyyy-DDD.hh:mm:ss z' );
-
-$formatted = ut_datefmt_format($fmt,0);
-$res_str .= "\nResult of formatting timestamp=0 is : \n$formatted";
-$formatted = ut_datefmt_format($fmt_clone,0);
-$res_str .= "\nResult of clone formatting timestamp=0 is : \n$formatted";
-
-echo $res_str;
-
-?>
---EXPECT--
-Result of formatting timestamp=0 is :
-31-12-69
-Result of formatting timestamp=0 is :
-1969-365.07:00:00 EST
-Result of clone formatting timestamp=0 is :
-31-12-69
diff --git a/ext/intl/tests/dateformat_clone2.phpt b/ext/intl/tests/dateformat_clone2.phpt
index 052b732164..e8d6b6949b 100644
--- a/ext/intl/tests/dateformat_clone2.phpt
+++ b/ext/intl/tests/dateformat_clone2.phpt
@@ -2,7 +2,6 @@
Cloning datefmt icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU 4.8+ only'; ?>
--FILE--
<?php
include_once( 'ut_common.inc' );
diff --git a/ext/intl/tests/dateformat_get_set_pattern.phpt b/ext/intl/tests/dateformat_get_set_pattern.phpt
deleted file mode 100644
index f8e7291a9c..0000000000
--- a/ext/intl/tests/dateformat_get_set_pattern.phpt
+++ /dev/null
@@ -1,84 +0,0 @@
---TEST--
-datefmt_get_pattern_code and datefmt_set_pattern_code() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Test for the datefmt_get_pattern & datefmt_set_pattern function
- */
-
-
-function ut_main()
-{
- $pattern_arr = array (
- 'DD-MM-YYYY hh:mm:ss',
- 'yyyy-DDD.hh:mm:ss z',
- "yyyy/MM/dd",
- "yyyyMMdd"
- );
-
- $res_str = '';
-
- $start_pattern = 'dd-MM-YY';
- $res_str .= "\nCreating IntlDateFormatter with pattern = $start_pattern ";
- //$fmt = ut_datefmt_create( "en-US", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT , 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern );
- $fmt = ut_datefmt_create( "en-US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern );
- $pattern = ut_datefmt_get_pattern( $fmt);
- $res_str .= "\nAfter call to get_pattern : pattern= $pattern";
- $formatted = ut_datefmt_format($fmt,0);
- $res_str .= "\nResult of formatting timestamp=0 is : \n$formatted";
-
-
- foreach( $pattern_arr as $pattern_entry )
- {
- $res_str .= "\n-------------------";
- $res_str .= "\nSetting IntlDateFormatter with pattern = $pattern_entry ";
- ut_datefmt_set_pattern( $fmt , $pattern_entry );
- $pattern = ut_datefmt_get_pattern( $fmt);
- $res_str .= "\nAfter call to get_pattern : pattern= $pattern";
- $formatted = ut_datefmt_format($fmt,0);
- $res_str .= "\nResult of formatting timestamp=0 with the new pattern is : \n$formatted";
- $res_str .= "\n";
-
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECT--
-Creating IntlDateFormatter with pattern = dd-MM-YY
-After call to get_pattern : pattern= dd-MM-YY
-Result of formatting timestamp=0 is :
-31-12-69
--------------------
-Setting IntlDateFormatter with pattern = DD-MM-YYYY hh:mm:ss
-After call to get_pattern : pattern= DD-MM-YYYY hh:mm:ss
-Result of formatting timestamp=0 with the new pattern is :
-365-12-1969 07:00:00
-
--------------------
-Setting IntlDateFormatter with pattern = yyyy-DDD.hh:mm:ss z
-After call to get_pattern : pattern= yyyy-DDD.hh:mm:ss z
-Result of formatting timestamp=0 with the new pattern is :
-1969-365.07:00:00 EST
-
--------------------
-Setting IntlDateFormatter with pattern = yyyy/MM/dd
-After call to get_pattern : pattern= yyyy/MM/dd
-Result of formatting timestamp=0 with the new pattern is :
-1969/12/31
-
--------------------
-Setting IntlDateFormatter with pattern = yyyyMMdd
-After call to get_pattern : pattern= yyyyMMdd
-Result of formatting timestamp=0 with the new pattern is :
-19691231
diff --git a/ext/intl/tests/dateformat_get_set_pattern2.phpt b/ext/intl/tests/dateformat_get_set_pattern2.phpt
index 6de5346143..b741906ad6 100644
--- a/ext/intl/tests/dateformat_get_set_pattern2.phpt
+++ b/ext/intl/tests/dateformat_get_set_pattern2.phpt
@@ -2,7 +2,6 @@
datefmt_get_pattern_code and datefmt_set_pattern_code() icu >= 4.8
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU 4.8+ only'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/dateformat_localtime.phpt b/ext/intl/tests/dateformat_localtime.phpt
deleted file mode 100644
index 5db43fb611..0000000000
--- a/ext/intl/tests/dateformat_localtime.phpt
+++ /dev/null
@@ -1,136 +0,0 @@
---TEST--
-datefmt_localtime_code() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---INI--
-date.timezone=UTC
---FILE--
-<?php
-
-/*
- * Test for the datefmt_localtime function
- */
-
-
-function ut_main()
-{
- $locale_arr = array (
- 'en_US_CA'
- );
-
- $datetype_arr = array (
- IntlDateFormatter::FULL,
- IntlDateFormatter::LONG,
- IntlDateFormatter::MEDIUM,
- IntlDateFormatter::SHORT,
- IntlDateFormatter::NONE
- );
-
- $res_str = '';
-
- $datetype_arr = array (
- IntlDateFormatter::FULL,
- IntlDateFormatter::LONG,
- IntlDateFormatter::MEDIUM,
- );
-
- $res_str = '';
-
-
- $text_arr = array (
- "Thursday, December 18, 1969 8:49:59 AM PST",
- "June 18, 1969 8:49:59 AM ",
- "12/18/69 8:49 AM",
- "19691218 08:49 AM"
- );
-
- $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG);
- $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM);
- $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
- $fmt_array = array(
- $fmt1 , $fmt2 ,$fmt3
- );
- $fmt_desc_array = array(
- "DateType::LONG, TimeType::LONG",
- "DateType::MEDIUM, TimeType::MEDIUM",
- "DateType::FULL, TimeType::FULL"
- );
-
- foreach( $text_arr as $text_entry){
- $res_str .= "\n-------------------------------\n";
- $res_str .= "\nInput text is : $text_entry";
- $cnt =0;
-
-
- foreach( $fmt_array as $fmt_entry ){
- $res_str .= "\n------------";
- $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt];
- $parse_pos = 0;
- $cnt++;
- $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry , $parse_pos );
-
- if( $parsed_arr){
- $res_str .= "\n";
- foreach( $parsed_arr as $key => $value){
- $res_str .= "$key : '$value' , ";
- }
- }
-/*
- else{
- //$res_str .= "No values found from LocaleTime parsing.";
- $res_str .= "\tError : '".intl_get_error_message()."'";
- }
-*/
- }//end of for $fmt_array
- }
-
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECTF--
--------------------------------
-
-Input text is : Thursday, December 18, 1969 8:49:59 AM PST
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL
-tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' ,
--------------------------------
-
-Input text is : June 18, 1969 8:49:59 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
-tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '%d' ,
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL
--------------------------------
-
-Input text is : 12/18/69 8:49 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL
--------------------------------
-
-Input text is : 19691218 08:49 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL
diff --git a/ext/intl/tests/dateformat_parse.phpt b/ext/intl/tests/dateformat_parse.phpt
deleted file mode 100644
index 6552c15aa9..0000000000
--- a/ext/intl/tests/dateformat_parse.phpt
+++ /dev/null
@@ -1,112 +0,0 @@
---TEST--
-datefmt_parse_code() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---INI--
-date.timezone="America/Los_Angeles"
---FILE--
-<?php
-
-/*
- * Test for the datefmt_parse function
- */
-
-putenv('TZ=America/Los_Angeles');
-
-function ut_main()
-{
- $locale_arr = array (
- 'en_US_CA'
- );
-
- $datetype_arr = array (
- IntlDateFormatter::FULL,
- IntlDateFormatter::LONG,
- IntlDateFormatter::MEDIUM,
- IntlDateFormatter::SHORT,
- IntlDateFormatter::NONE
- );
-
- $res_str = '';
-
-
- $text_arr = array (
- // Full parsing
- array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::FULL),
- array("Wednesday, December 17, 1969 6:40:00 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::FULL),
- array("Thursday, December 18, 1969 8:49:59 PM PST", IntlDateFormatter::FULL, IntlDateFormatter::FULL),
- array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::FULL),
- array("12/18/69 8:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT),
- array("19691218 08:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT),
- // Partial parsing
- array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::NONE),
- array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::SHORT),
- array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::NONE),
- array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::SHORT),
- array("12/18/69 8:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::LONG),
- array("19691218 08:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::LONG),
- );
-
- foreach( $text_arr as $text_entry){
- $fmt = ut_datefmt_create( 'en_US_CA', $text_entry[1], $text_entry[2]);
- $parse_pos = 0;
- $parsed = ut_datefmt_parse( $fmt , $text_entry[0] , $parse_pos );
-
- $res_str .= "\nInput text : {$text_entry[0]} ; DF = {$text_entry[1]}; TF = {$text_entry[2]}";
- if( intl_get_error_code() != U_ZERO_ERROR) {
- $res_str .= "\nError : ".intl_get_error_message();
- }
- $res_str .= "\nParsed: $parsed; parse_pos : $parse_pos\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECT--
-Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = 0
-Parsed: 2200000000; parse_pos : 40
-
-Input text : Wednesday, December 17, 1969 6:40:00 PM PT ; DF = 0; TF = 0
-Parsed: -1200000; parse_pos : 42
-
-Input text : Thursday, December 18, 1969 8:49:59 PM PST ; DF = 0; TF = 0
-Parsed: -1105801; parse_pos : 42
-
-Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = 0
-Parsed: -1149001; parse_pos : 32
-
-Input text : 12/18/69 8:49 AM ; DF = 3; TF = 3
-Parsed: -1149060; parse_pos : 16
-
-Input text : 19691218 08:49 AM ; DF = 3; TF = 3
-Error : Date parsing failed: U_PARSE_ERROR
-Parsed: ; parse_pos : 8
-
-Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = -1
-Parsed: 2199942000; parse_pos : 26
-
-Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = 3
-Error : Date parsing failed: U_PARSE_ERROR
-Parsed: ; parse_pos : 31
-
-Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = -1
-Parsed: -1180800; parse_pos : 17
-
-Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = 3
-Error : Date parsing failed: U_PARSE_ERROR
-Parsed: ; parse_pos : 22
-
-Input text : 12/18/69 8:49 AM ; DF = 3; TF = 1
-Error : Date parsing failed: U_PARSE_ERROR
-Parsed: ; parse_pos : 13
-
-Input text : 19691218 08:49 AM ; DF = 3; TF = 1
-Error : Date parsing failed: U_PARSE_ERROR
-Parsed: ; parse_pos : 8
diff --git a/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt b/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt
deleted file mode 100644
index c491608ad3..0000000000
--- a/ext/intl/tests/dateformat_parse_localtime_parsepos.phpt
+++ /dev/null
@@ -1,120 +0,0 @@
---TEST--
-datefmt_parse_localtime() with parse pos icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Test for the datefmt_parse_localtime function with parse pos
- */
-
-
-function ut_main()
-{
- $locale_arr = array (
- 'en_US_CA'
- );
-
- $datetype_arr = array (
- IntlDateFormatter::FULL,
- IntlDateFormatter::LONG,
- IntlDateFormatter::MEDIUM,
- );
-
- $res_str = '';
-
-
- $text_arr = array (
- "Thursday, December 18, 1969 8:49:59 AM PST",
- "June 18, 1969 8:49:59 AM ",
- "12/18/69 8:49 AM",
- "19691218 08:49 AM"
- );
-
- $fmt1 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::LONG, IntlDateFormatter::LONG);
- $fmt2 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::MEDIUM, IntlDateFormatter::MEDIUM);
- $fmt3 = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::FULL, IntlDateFormatter::FULL);
- $fmt_array = array(
- $fmt1 , $fmt2 ,$fmt3
- );
- $fmt_desc_array = array(
- "DateType::LONG, TimeType::LONG",
- "DateType::MEDIUM, TimeType::MEDIUM",
- "DateType::FULL, TimeType::FULL"
- );
-
- foreach( $text_arr as $text_entry){
- $res_str .= "\n-------------------------------\n";
- $res_str .= "\nInput text is : $text_entry";
- $cnt =0;
- foreach( $fmt_array as $fmt_entry ){
- $res_str .= "\n------------";
- $res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt];
- $cnt++;
- $parsed_arr = ut_datefmt_localtime( $fmt_entry , $text_entry);
-
- if( $parsed_arr){
- $res_str .= "\n";
- foreach( $parsed_arr as $key => $value){
- $res_str .= "$key : '$value' , ";
- }
- }
- else{
- //$res_str .= "No values found from LocaleTime parsing.";
- $res_str .= "\tError : '".intl_get_error_message()."'";
- }
-
- }
- }
-
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECTF--
--------------------------------
-
-Input text is : Thursday, December 18, 1969 8:49:59 AM PST
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL
-tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' ,
--------------------------------
-
-Input text is : June 18, 1969 8:49:59 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
-tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '%d' ,
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR'
--------------------------------
-
-Input text is : 12/18/69 8:49 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR'
--------------------------------
-
-Input text is : 19691218 08:49 AM
-------------
-IntlDateFormatter : DateType::LONG, TimeType::LONG Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM Error : 'Date parsing failed: U_PARSE_ERROR'
-------------
-IntlDateFormatter : DateType::FULL, TimeType::FULL Error : 'Date parsing failed: U_PARSE_ERROR'
diff --git a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt b/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt
deleted file mode 100644
index 77af7c915e..0000000000
--- a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt
+++ /dev/null
@@ -1,157 +0,0 @@
---TEST--
-datefmt_parse_timestamp_code() with parse pos icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---INI--
-date.timezone="America/Los_Angeles"
---ENV--
-TZ=America/Los_Angeles
---FILE--
-<?php
-
-/*
- * Test for the datefmt_parse_timestamp function with parse_pos
- */
-
-
-function ut_main()
-{
- $locale_arr = array (
- 'en_US_CA'
- );
-
- $datetype_arr = array (
- IntlDateFormatter::FULL,
- IntlDateFormatter::LONG,
- IntlDateFormatter::MEDIUM,
- IntlDateFormatter::SHORT,
- IntlDateFormatter::NONE
- );
-
- $res_str = '';
-
-
- $text_arr = array (
- "Sunday, September 18, 3039 4:06:40 PM PT",
- "Thursday, December 18, 1969 8:49:59 AM PST",
- //"December 18, 1969 8:49:59 AM PST",
- "12/18/69 8:49 AM",
- "20111218 08:49 AM",
- "19691218 08:49 AM"
- );
-
- foreach( $text_arr as $text_entry){
- $res_str .= "\n------------\n";
- $res_str .= "\nInput text is : $text_entry";
- $res_str .= "\n------------";
-
- foreach( $locale_arr as $locale_entry ){
- $res_str .= "\nLocale is : $locale_entry";
- $res_str .= "\n------------";
- foreach( $datetype_arr as $datetype_entry )
- {
- $res_str .= "\ndatetype = $datetype_entry ,timetype =$datetype_entry";
- $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry);
- $pos = 0;
- $parsed = ut_datefmt_parse( $fmt , $text_entry, $pos);
- if( intl_get_error_code() == U_ZERO_ERROR){
- $res_str .= "\nParsed text is : $parsed; Position = $pos";
- }else{
- $res_str .= "\nError while parsing as: '".intl_get_error_message()."'; Position = $pos";
- }
- }
- }
- }
- $res_str .= "\n";
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECT--
-------------
-
-Input text is : Sunday, September 18, 3039 4:06:40 PM PT
-------------
-Locale is : en_US_CA
-------------
-datetype = 0 ,timetype =0
-Parsed text is : 33756908800; Position = 40
-datetype = 1 ,timetype =1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 2 ,timetype =2
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 3 ,timetype =3
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = -1 ,timetype =-1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-------------
-
-Input text is : Thursday, December 18, 1969 8:49:59 AM PST
-------------
-Locale is : en_US_CA
-------------
-datetype = 0 ,timetype =0
-Parsed text is : -1149001; Position = 42
-datetype = 1 ,timetype =1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 2 ,timetype =2
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 3 ,timetype =3
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = -1 ,timetype =-1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-------------
-
-Input text is : 12/18/69 8:49 AM
-------------
-Locale is : en_US_CA
-------------
-datetype = 0 ,timetype =0
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 1 ,timetype =1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 2 ,timetype =2
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 3 ,timetype =3
-Parsed text is : -1149060; Position = 16
-datetype = -1 ,timetype =-1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-------------
-
-Input text is : 20111218 08:49 AM
-------------
-Locale is : en_US_CA
-------------
-datetype = 0 ,timetype =0
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 1 ,timetype =1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 2 ,timetype =2
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 3 ,timetype =3
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 8
-datetype = -1 ,timetype =-1
-Parsed text is : 1324226940; Position = 17
-------------
-
-Input text is : 19691218 08:49 AM
-------------
-Locale is : en_US_CA
-------------
-datetype = 0 ,timetype =0
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 1 ,timetype =1
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 2 ,timetype =2
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0
-datetype = 3 ,timetype =3
-Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 8
-datetype = -1 ,timetype =-1
-Parsed text is : -1149060; Position = 17
diff --git a/ext/intl/tests/dateformat_set_timezone_id.phpt b/ext/intl/tests/dateformat_set_timezone_id.phpt
deleted file mode 100644
index 72a9230bdf..0000000000
--- a/ext/intl/tests/dateformat_set_timezone_id.phpt
+++ /dev/null
@@ -1,76 +0,0 @@
---TEST--
-datefmt_set_timezone_id_code() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Test for the datefmt_set_timezone_id function
- */
-
-
-function ut_main()
-{
- $timezone_id_arr = array (
- 'America/New_York',
- 'America/Los_Angeles',
- 'America/Chicago',
- 'CN'
- );
- $timestamp_entry = 0;
-
- $res_str = '';
-
- $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/San_Francisco' , IntlDateFormatter::GREGORIAN );
- $timezone_id = ut_datefmt_get_timezone_id( $fmt );
- $res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n";
-
- foreach( $timezone_id_arr as $timezone_id_entry )
- {
-
- $res_str .= "-----------";
- $res_str .= "\nTrying to set timezone_id= $timezone_id_entry";
- ut_datefmt_set_timezone_id( $fmt , $timezone_id_entry );
- $timezone_id = ut_datefmt_get_timezone_id( $fmt );
- $res_str .= "\nAfter call to set_timezone_id : timezone_id= $timezone_id";
- $formatted = ut_datefmt_format( $fmt, 0);
- $res_str .= "\nFormatting timestamp=0 resulted in $formatted";
- $formatted = ut_datefmt_format( $fmt, 3600);
- $res_str .= "\nFormatting timestamp=3600 resulted in $formatted";
- $res_str .= "\n";
-
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-?>
---EXPECT--
-After creation of the dateformatter : timezone_id= America/San_Francisco
------------
-Trying to set timezone_id= America/New_York
-After call to set_timezone_id : timezone_id= America/New_York
-Formatting timestamp=0 resulted in Wednesday, December 31, 1969 7:00:00 PM Eastern Standard Time
-Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 8:00:00 PM Eastern Standard Time
------------
-Trying to set timezone_id= America/Los_Angeles
-After call to set_timezone_id : timezone_id= America/Los_Angeles
-Formatting timestamp=0 resulted in Wednesday, December 31, 1969 4:00:00 PM Pacific Standard Time
-Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 5:00:00 PM Pacific Standard Time
------------
-Trying to set timezone_id= America/Chicago
-After call to set_timezone_id : timezone_id= America/Chicago
-Formatting timestamp=0 resulted in Wednesday, December 31, 1969 6:00:00 PM Central Standard Time
-Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 7:00:00 PM Central Standard Time
------------
-Trying to set timezone_id= CN
-After call to set_timezone_id : timezone_id= CN
-Formatting timestamp=0 resulted in Thursday, January 1, 1970 12:00:00 AM GMT+00:00
-Formatting timestamp=3600 resulted in Thursday, January 1, 1970 1:00:00 AM GMT+00:00
diff --git a/ext/intl/tests/dateformat_set_timezone_id2.phpt b/ext/intl/tests/dateformat_set_timezone_id2.phpt
index 9e8c9760a6..3d22f7d03d 100644
--- a/ext/intl/tests/dateformat_set_timezone_id2.phpt
+++ b/ext/intl/tests/dateformat_set_timezone_id2.phpt
@@ -3,8 +3,7 @@ datefmt_set_timezone_id_code() icu >= 4.8
--INI--
date.timezone=Atlantic/Azores
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format.phpt b/ext/intl/tests/formatter_format.phpt
deleted file mode 100644
index 334ef49567..0000000000
--- a/ext/intl/tests/formatter_format.phpt
+++ /dev/null
@@ -1,130 +0,0 @@
---TEST--
-numfmt_format() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Format a number using misc locales/patterns.
- */
-
-/*
- * TODO: doesn't pass on ICU 3.6 because 'ru' and 'de' locales changed
- * currency and percent formatting.
- */
-
-function ut_main()
-{
- $styles = array(
- NumberFormatter::PATTERN_DECIMAL => '##.#####################',
- NumberFormatter::DECIMAL => '',
- NumberFormatter::CURRENCY => '',
- NumberFormatter::PERCENT => '',
- NumberFormatter::SCIENTIFIC => '',
- NumberFormatter::SPELLOUT => '@@@@@@@',
- NumberFormatter::ORDINAL => '',
- NumberFormatter::DURATION => '',
- NumberFormatter::PATTERN_RULEBASED => '#####.###',
- 1234999, // bad one
- );
-
- $integer = array(
- NumberFormatter::ORDINAL => '',
- NumberFormatter::DURATION => '',
- );
- $locales = array(
- 'en_US',
- 'ru_UA',
- 'de',
- 'fr',
- 'en_UK'
- );
-
- $str_res = '';
- $number = 1234567.891234567890000;
-
- foreach( $locales as $locale )
- {
- $str_res .= "\nLocale is: $locale\n";
- foreach( $styles as $style => $pattern )
- {
- $fmt = ut_nfmt_create( $locale, $style, $pattern );
-
- if(!$fmt) {
- $str_res .= "Bad formatter!\n";
- continue;
- }
- $str_res .= dump( isset($integer[$style])?ut_nfmt_format( $fmt, $number, NumberFormatter::TYPE_INT32):ut_nfmt_format( $fmt, $number ) ) . "\n";
- }
- }
- return $str_res;
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-
-?>
---EXPECTREGEX--
-Locale is: en_US
-'1234567.89123457'
-'1,234,567.891'
-'\$1,234,567.89'
-'123,456,789%'
-'1.23456789123457E6'
-'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
-'1,234,567(th|ᵗʰ)'
-'342:56:07'
-'#####.###'
-Bad formatter!
-
-Locale is: ru_UA
-'1234567,89123457'
-'1 234 567,891'
-'1 234 567,89 ?(грн\.|₴)'
-'123 456 789 ?%'
-'1,23456789123457E6'
-'один миллион двасти тридцать четыре тысяч пятьсот шестьдесят семь запятая восемь девять один два три четыре пять семь'
-'1 234 567.?'
-'1 234 567'
-'#####.###'
-Bad formatter!
-
-Locale is: de
-'1234567,89123457'
-'1.234.567,891'
-'(¤ )?1.234.567,89( ¤)?'
-'123\.456\.789 %'
-'1,23456789123457E6'
-'eine Million zwei­hundert­vier­und­dreißig­tausend­fünf­hundert­sieben­und­sechzig Komma acht neun eins zwei drei vier fünf sieben'
-'1.234.567.?'
-'1.234.567'
-'#####.###'
-Bad formatter!
-
-Locale is: fr
-'1234567,89123457'
-'1 234 567,891'
-'1 234 567,89 ¤'
-'123 456 789 ?%'
-'1,23456789123457E6'
-'un million deux-cent-trente-quatre-mille-cinq-cent-soixante-sept virgule huit neuf un deux trois quatre cinq sept'
-'1 234 567ᵉ?'
-'1 234 567'
-'#####.###'
-Bad formatter!
-
-Locale is: en_UK
-'1234567.89123457'
-'1,234,567.891'
-'¤1,234,567.89'
-'123,456,789%'
-'1.23456789123457E6'
-'one million,? two hundred (and )?thirty-four thousand,? five hundred (and )?sixty-seven point eight nine one two three four five seven'
-'1,234,567(th|ᵗʰ)'
-'342:56:07'
-'#####.###'
-Bad formatter!
diff --git a/ext/intl/tests/formatter_format2.phpt b/ext/intl/tests/formatter_format2.phpt
index 32c42f69da..26ef060ea0 100644
--- a/ext/intl/tests/formatter_format2.phpt
+++ b/ext/intl/tests/formatter_format2.phpt
@@ -1,8 +1,8 @@
--TEST--
numfmt_format() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU <= 52.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_format_currency.phpt b/ext/intl/tests/formatter_format_currency.phpt
deleted file mode 100644
index be219a5baa..0000000000
--- a/ext/intl/tests/formatter_format_currency.phpt
+++ /dev/null
@@ -1,50 +0,0 @@
---TEST--
-numfmt_format_currency() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Format a number using misc currencies/locales.
- */
-/*
- * TODO: doesn't pass on ICU 3.6 because 'ru' and 'uk' locales changed
- * currency formatting.
- */
-
-
-function ut_main()
-{
- $locales = array(
- 'en_UK' => 'GBP',
- 'en_US' => 'USD',
- 'ru' => 'RUR',
- 'uk' => 'UAH',
- 'en' => 'UAH'
- );
-
- $res_str = '';
- $number = 1234567.89;
-
- foreach( $locales as $locale => $currency )
- {
- $fmt = ut_nfmt_create( $locale, NumberFormatter::CURRENCY );
- $res_str .= "$locale: " . var_export( ut_nfmt_format_currency( $fmt, $number, $currency ), true ) . "\n";
- }
- return $res_str;
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-
-?>
---EXPECT--
-en_UK: '£1,234,567.89'
-en_US: '$1,234,567.89'
-ru: '1 234 567,89 р.'
-uk: '1 234 567,89 ₴'
-en: '₴1,234,567.89'
diff --git a/ext/intl/tests/formatter_format_currency2.phpt b/ext/intl/tests/formatter_format_currency2.phpt
index 16a421018c..1c7c48890a 100644
--- a/ext/intl/tests/formatter_format_currency2.phpt
+++ b/ext/intl/tests/formatter_format_currency2.phpt
@@ -1,8 +1,7 @@
--TEST--
numfmt_format_currency() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/formatter_get_set_attribute.phpt b/ext/intl/tests/formatter_get_set_attribute.phpt
deleted file mode 100644
index 51c7d3658a..0000000000
--- a/ext/intl/tests/formatter_get_set_attribute.phpt
+++ /dev/null
@@ -1,194 +0,0 @@
---TEST--
-numfmt_get/set_attribute()
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.2', '<') != 1) print 'skip for ICU 4.4+'; ?>
---FILE--
-<?php
-
-/*
- * Get/set various number formatting attributes.
- */
-
-
-function ut_main()
-{
- // attr_name => array( attr, value )
- $attributes = array(
- 'PARSE_INT_ONLY' => array( NumberFormatter::PARSE_INT_ONLY, 1, 12345.123456 ),
- 'GROUPING_USED' => array( NumberFormatter::GROUPING_USED, 0, 12345.123456 ),
- 'DECIMAL_ALWAYS_SHOWN' => array( NumberFormatter::DECIMAL_ALWAYS_SHOWN, 1, 12345 ),
- 'MAX_INTEGER_DIGITS' => array( NumberFormatter::MAX_INTEGER_DIGITS, 2, 12345.123456 ),
- 'MIN_INTEGER_DIGITS' => array( NumberFormatter::MIN_INTEGER_DIGITS, 20, 12345.123456 ),
- 'INTEGER_DIGITS' => array( NumberFormatter::INTEGER_DIGITS, 7, 12345.123456 ),
- 'MAX_FRACTION_DIGITS' => array( NumberFormatter::MAX_FRACTION_DIGITS, 2, 12345.123456 ),
- 'MIN_FRACTION_DIGITS' => array( NumberFormatter::MIN_FRACTION_DIGITS, 20, 12345.123456 ),
- 'FRACTION_DIGITS' => array( NumberFormatter::FRACTION_DIGITS, 5, 12345.123456 ),
- 'MULTIPLIER' => array( NumberFormatter::MULTIPLIER, 2, 12345.123456 ),
- 'GROUPING_SIZE' => array( NumberFormatter::GROUPING_SIZE, 2, 12345.123456 ),
- 'ROUNDING_MODE' => array( NumberFormatter::ROUNDING_MODE, 1, 12345.123456 ),
- 'ROUNDING_INCREMENT' => array( NumberFormatter::ROUNDING_INCREMENT, (float)2, 12345.123456 ),
- 'FORMAT_WIDTH' => array( NumberFormatter::FORMAT_WIDTH, 27, 12345.123456 ),
- 'PADDING_POSITION' => array( NumberFormatter::PADDING_POSITION, 2, 12345.123456 ),
- 'SECONDARY_GROUPING_SIZE' => array( NumberFormatter::SECONDARY_GROUPING_SIZE, 2, 12345.123456 ),
- 'SIGNIFICANT_DIGITS_USED' => array( NumberFormatter::SIGNIFICANT_DIGITS_USED, 1, 12345.123456 ),
- 'MIN_SIGNIFICANT_DIGITS' => array( NumberFormatter::MIN_SIGNIFICANT_DIGITS, 3, 1 ),
- 'MAX_SIGNIFICANT_DIGITS' => array( NumberFormatter::MAX_SIGNIFICANT_DIGITS, 4, 12345.123456 ),
- // 'LENIENT_PARSE' => array( NumberFormatter::LENIENT_PARSE, 2, 12345.123456 )
- );
-
- $res_str = '';
-
- $fmt = ut_nfmt_create( "en_US", NumberFormatter::DECIMAL );
-
- foreach( $attributes as $attr_name => $args )
- {
- list( $attr, $new_val, $number ) = $args;
- $res_str .= "\nAttribute $attr_name\n";
-
- // Get original value of the attribute.
- $orig_val = ut_nfmt_get_attribute( $fmt, $attr );
-
- // Format the number using the original attribute value.
- $rc = ut_nfmt_format( $fmt, $number );
-
- $ps = ut_nfmt_parse( $fmt, $rc );
-
- $res_str .= sprintf( "Old attribute value: %s ; Format result: %s ; Parse result: %s\n",
- dump( $orig_val ),
- dump( $rc ),
- dump( $ps ) );
-
- // Set new attribute value.
- $rc = ut_nfmt_set_attribute( $fmt, $attr, $new_val );
- if( $rc )
- $res_str .= "Setting attribute: ok\n";
- else
- $res_str .= sprintf( "Setting attribute failed: %s\n", ut_nfmt_get_error_message( $fmt ) );
-
- // Format the number using the new value.
- $rc = ut_nfmt_format( $fmt, $number );
-
- // Get current value of the attribute and check if it equals $new_val.
- $attr_val_check = ut_nfmt_get_attribute( $fmt, $attr );
- if( $attr_val_check !== $new_val )
- $res_str .= "ERROR: New $attr_name attribute value has not been set correctly.\n";
-
- $ps = ut_nfmt_parse( $fmt, $rc );
-
- $res_str .= sprintf( "New attribute value: %s ; Format result: %s ; Parse result: %s\n",
- dump( $new_val ),
- dump( $rc ),
- dump( $ps ) );
-
-
- // Restore original attribute of the value
- if( $attr != NumberFormatter::INTEGER_DIGITS && $attr != NumberFormatter::FRACTION_DIGITS
- && $attr != NumberFormatter::FORMAT_WIDTH && $attr != NumberFormatter::SIGNIFICANT_DIGITS_USED )
- ut_nfmt_set_attribute( $fmt, $attr, $orig_val );
- }
-
- return $res_str;
-}
-
-include_once( 'ut_common.inc' );
-
-// Run the test
-ut_run();
-
-?>
---EXPECT--
-Attribute PARSE_INT_ONLY
-Old attribute value: 0 ; Format result: '12,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 1 ; Format result: '12,345.123' ; Parse result: 12345
-
-Attribute GROUPING_USED
-Old attribute value: 1 ; Format result: '12,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 0 ; Format result: '12345.123' ; Parse result: 12345.123
-
-Attribute DECIMAL_ALWAYS_SHOWN
-Old attribute value: 0 ; Format result: '12,345' ; Parse result: 12345
-Setting attribute: ok
-New attribute value: 1 ; Format result: '12,345.' ; Parse result: 12345
-
-Attribute MAX_INTEGER_DIGITS
-Old attribute value: 309 ; Format result: '12,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 2 ; Format result: '45.123' ; Parse result: 45.123
-
-Attribute MIN_INTEGER_DIGITS
-Old attribute value: 1 ; Format result: '12,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 20 ; Format result: '00,000,000,000,000,012,345.123' ; Parse result: 12345.123
-
-Attribute INTEGER_DIGITS
-Old attribute value: 1 ; Format result: '12,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 7 ; Format result: '0,012,345.123' ; Parse result: 12345.123
-
-Attribute MAX_FRACTION_DIGITS
-Old attribute value: 3 ; Format result: '0,012,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 2 ; Format result: '0,012,345.12' ; Parse result: 12345.12
-
-Attribute MIN_FRACTION_DIGITS
-Old attribute value: 0 ; Format result: '0,012,345.123' ; Parse result: 12345.123
-Setting attribute: ok
-New attribute value: 20 ; Format result: '0,012,345.12345600000000000000' ; Parse result: 12345.123456
-
-Attribute FRACTION_DIGITS
-Old attribute value: 0 ; Format result: '0,012,345.123456' ; Parse result: 12345.123456
-Setting attribute: ok
-New attribute value: 5 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-
-Attribute MULTIPLIER
-Old attribute value: 1 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 2 ; Format result: '0,024,690.24691' ; Parse result: 12345.123455
-
-Attribute GROUPING_SIZE
-Old attribute value: 3 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 2 ; Format result: '0,01,23,45.12346' ; Parse result: 12345.12346
-
-Attribute ROUNDING_MODE
-Old attribute value: 4 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 1 ; Format result: '0,012,345.12345' ; Parse result: 12345.12345
-
-Attribute ROUNDING_INCREMENT
-Old attribute value: 0 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 2 ; Format result: '0,012,346.00000' ; Parse result: 12346
-
-Attribute FORMAT_WIDTH
-Old attribute value: 0 ; Format result: '0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 27 ; Format result: '************0,012,345.12346' ; Parse result: 12345.12346
-
-Attribute PADDING_POSITION
-Old attribute value: 0 ; Format result: '************0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 2 ; Format result: '0,012,345.12346************' ; Parse result: 12345.12346
-
-Attribute SECONDARY_GROUPING_SIZE
-Old attribute value: 0 ; Format result: '************0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 2 ; Format result: '************00,12,345.12346' ; Parse result: 12345.12346
-
-Attribute SIGNIFICANT_DIGITS_USED
-Old attribute value: 0 ; Format result: '************0,012,345.12346' ; Parse result: 12345.12346
-Setting attribute: ok
-New attribute value: 1 ; Format result: '*******************12,345.1' ; Parse result: 12345.1
-
-Attribute MIN_SIGNIFICANT_DIGITS
-Old attribute value: 1 ; Format result: '**************************1' ; Parse result: 1
-Setting attribute: ok
-New attribute value: 3 ; Format result: '***********************1.00' ; Parse result: 1
-
-Attribute MAX_SIGNIFICANT_DIGITS
-Old attribute value: 6 ; Format result: '*******************12,345.1' ; Parse result: 12345.1
-Setting attribute: ok
-New attribute value: 4 ; Format result: '*********************12,350' ; Parse result: 12350
diff --git a/ext/intl/tests/formatter_get_set_symbol.phpt b/ext/intl/tests/formatter_get_set_symbol.phpt
deleted file mode 100644
index 52639d568a..0000000000
--- a/ext/intl/tests/formatter_get_set_symbol.phpt
+++ /dev/null
@@ -1,189 +0,0 @@
---TEST--
-numfmt_get/set_symbol() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Get/set symbol.
- */
-
-
-function ut_main()
-{
- $longstr = str_repeat("blah", 10);
- $symbols = array(
- 'DECIMAL_SEPARATOR_SYMBOL' => array( NumberFormatter::DECIMAL_SEPARATOR_SYMBOL, '_._', 12345.123456, NumberFormatter::DECIMAL ),
- 'GROUPING_SEPARATOR_SYMBOL' => array( NumberFormatter::GROUPING_SEPARATOR_SYMBOL, '_,_', 12345.123456, NumberFormatter::DECIMAL ),
- 'PATTERN_SEPARATOR_SYMBOL' => array( NumberFormatter::PATTERN_SEPARATOR_SYMBOL, '_;_', 12345.123456, NumberFormatter::DECIMAL ),
- 'PERCENT_SYMBOL' => array( NumberFormatter::PERCENT_SYMBOL, '_%_', 12345.123456, NumberFormatter::PERCENT ),
- 'ZERO_DIGIT_SYMBOL' => array( NumberFormatter::ZERO_DIGIT_SYMBOL, '_ZD_', 12345.123456, NumberFormatter::DECIMAL ),
- 'DIGIT_SYMBOL' => array( NumberFormatter::DIGIT_SYMBOL, '_DS_', 12345.123456, NumberFormatter::DECIMAL ),
- 'MINUS_SIGN_SYMBOL' => array( NumberFormatter::MINUS_SIGN_SYMBOL, '_-_', -12345.123456, NumberFormatter::DECIMAL ),
- 'PLUS_SIGN_SYMBOL' => array( NumberFormatter::PLUS_SIGN_SYMBOL, '_+_', 12345.123456, NumberFormatter::SCIENTIFIC ),
- 'CURRENCY_SYMBOL' => array( NumberFormatter::CURRENCY_SYMBOL, '_$_', 12345.123456, NumberFormatter::CURRENCY ),
- 'INTL_CURRENCY_SYMBOL' => array( NumberFormatter::INTL_CURRENCY_SYMBOL, '_$_', 12345.123456, NumberFormatter::CURRENCY ),
- 'MONETARY_SEPARATOR_SYMBOL' => array( NumberFormatter::MONETARY_SEPARATOR_SYMBOL, '_MS_', 12345.123456, NumberFormatter::CURRENCY ),
- 'EXPONENTIAL_SYMBOL' => array( NumberFormatter::EXPONENTIAL_SYMBOL, '_E_', 12345.123456, NumberFormatter::SCIENTIFIC ),
- 'PERMILL_SYMBOL' => array( NumberFormatter::PERMILL_SYMBOL, '_PS_', 12345.123456, NumberFormatter::DECIMAL ),
- 'PAD_ESCAPE_SYMBOL' => array( NumberFormatter::PAD_ESCAPE_SYMBOL, '_PE_', 12345.123456, NumberFormatter::DECIMAL ),
- 'INFINITY_SYMBOL' => array( NumberFormatter::INFINITY_SYMBOL, '_IS_', 12345.123456, NumberFormatter::DECIMAL ),
- 'NAN_SYMBOL' => array( NumberFormatter::NAN_SYMBOL, '_N_', 12345.123456, NumberFormatter::DECIMAL ),
- 'SIGNIFICANT_DIGIT_SYMBOL' => array( NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL, '_SD_', 12345.123456, NumberFormatter::DECIMAL ),
- 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => array( NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL, '_MG_', 12345.123456, NumberFormatter::CURRENCY ),
- 'MONETARY_GROUPING_SEPARATOR_SYMBOL-2' => array( NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL, "&nbsp;", 12345.123456, NumberFormatter::CURRENCY ),
- 'MONETARY_GROUPING_SEPARATOR_SYMBOL-3' => array( NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL, $longstr, 12345.123456, NumberFormatter::CURRENCY ),
- );
-
- $res_str = '';
-
- foreach( $symbols as $symb_name => $data )
- {
- list( $symb, $new_val, $number, $attr ) = $data;
-
- $fmt = ut_nfmt_create( 'en_US', $attr);
-
- $res_str .= "\nSymbol '$symb_name'\n";
-
- // Get original symbol value.
- $orig_val = ut_nfmt_get_symbol( $fmt, $symb );
- $res_str .= "Default symbol: [$orig_val]\n";
-
- // Set a new symbol value.
- $res_val = ut_nfmt_set_symbol( $fmt, $symb, $new_val );
- if( !$res_val )
- $res_str .= "set_symbol() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
-
- // Get the symbol value back.
- $new_val_check = ut_nfmt_get_symbol( $fmt, $symb );
- if( !$new_val_check )
- $res_str .= "get_symbol() error: " . ut_nfmt_get_error_message( $fmt ) . "\n";
-
- $res_str .= "New symbol: [$new_val_check]\n";
-
- // Check if the new value has been set.
- if( $new_val_check !== $new_val )
- $res_str .= "ERROR: New $symb_name symbol value has not been set correctly.\n";
-
- // Format the number using the new value.
- $s = ut_nfmt_format( $fmt, $number );
- $res_str .= "A number formatted with the new symbol: $s\n";
-
- // Restore attribute's symbol.
- ut_nfmt_set_symbol( $fmt, $symb, $orig_val );
- }
- $badvals = array(2147483648, -2147483648, -1, 4294901761);
- foreach($badvals as $badval) {
- if(ut_nfmt_get_symbol( $fmt, 2147483648 )) {
- $res_str .= "Bad value $badval should return false!\n";
- }
- }
- return $res_str;
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECT--
-Symbol 'DECIMAL_SEPARATOR_SYMBOL'
-Default symbol: [.]
-New symbol: [_._]
-A number formatted with the new symbol: 12,345_._123
-
-Symbol 'GROUPING_SEPARATOR_SYMBOL'
-Default symbol: [,]
-New symbol: [_,_]
-A number formatted with the new symbol: 12_,_345.123
-
-Symbol 'PATTERN_SEPARATOR_SYMBOL'
-Default symbol: [;]
-New symbol: [_;_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'PERCENT_SYMBOL'
-Default symbol: [%]
-New symbol: [_%_]
-A number formatted with the new symbol: 1,234,512_%_
-
-Symbol 'ZERO_DIGIT_SYMBOL'
-Default symbol: [0]
-New symbol: [_ZD_]
-A number formatted with the new symbol: `a,bcd.`ab
-
-Symbol 'DIGIT_SYMBOL'
-Default symbol: [#]
-New symbol: [_DS_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'MINUS_SIGN_SYMBOL'
-Default symbol: [-]
-New symbol: [_-_]
-A number formatted with the new symbol: _-_12,345.123
-
-Symbol 'PLUS_SIGN_SYMBOL'
-Default symbol: [+]
-New symbol: [_+_]
-A number formatted with the new symbol: 1.2345123456E4
-
-Symbol 'CURRENCY_SYMBOL'
-Default symbol: [$]
-New symbol: [_$_]
-A number formatted with the new symbol: _$_12,345.12
-
-Symbol 'INTL_CURRENCY_SYMBOL'
-Default symbol: [USD]
-New symbol: [_$_]
-A number formatted with the new symbol: $12,345.12
-
-Symbol 'MONETARY_SEPARATOR_SYMBOL'
-Default symbol: [.]
-New symbol: [_MS_]
-A number formatted with the new symbol: $12,345_MS_12
-
-Symbol 'EXPONENTIAL_SYMBOL'
-Default symbol: [E]
-New symbol: [_E_]
-A number formatted with the new symbol: 1.2345123456_E_4
-
-Symbol 'PERMILL_SYMBOL'
-Default symbol: [‰]
-New symbol: [_PS_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'PAD_ESCAPE_SYMBOL'
-Default symbol: [*]
-New symbol: [_PE_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'INFINITY_SYMBOL'
-Default symbol: [∞]
-New symbol: [_IS_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'NAN_SYMBOL'
-Default symbol: [NaN]
-New symbol: [_N_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'SIGNIFICANT_DIGIT_SYMBOL'
-Default symbol: [@]
-New symbol: [_SD_]
-A number formatted with the new symbol: 12,345.123
-
-Symbol 'MONETARY_GROUPING_SEPARATOR_SYMBOL'
-Default symbol: [,]
-New symbol: [_MG_]
-A number formatted with the new symbol: $12_MG_345.12
-
-Symbol 'MONETARY_GROUPING_SEPARATOR_SYMBOL-2'
-Default symbol: [,]
-New symbol: [&nbsp;]
-A number formatted with the new symbol: $12&nbsp;345.12
-
-Symbol 'MONETARY_GROUPING_SEPARATOR_SYMBOL-3'
-Default symbol: [,]
-New symbol: [blahblahblahblahblahblahblahblahblahblah]
-A number formatted with the new symbol: $12blahblahblahblahblahblahblahblahblahblah345.12
diff --git a/ext/intl/tests/formatter_get_set_symbol2.phpt b/ext/intl/tests/formatter_get_set_symbol2.phpt
index 559fb2dcbb..201a4f6872 100644
--- a/ext/intl/tests/formatter_get_set_symbol2.phpt
+++ b/ext/intl/tests/formatter_get_set_symbol2.phpt
@@ -1,8 +1,7 @@
--TEST--
numfmt_get/set_symbol() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/gregoriancalendar___construct_basic.phpt b/ext/intl/tests/gregoriancalendar___construct_basic.phpt
index bdbef6725b..bb059c2edd 100644
--- a/ext/intl/tests/gregoriancalendar___construct_basic.phpt
+++ b/ext/intl/tests/gregoriancalendar___construct_basic.phpt
@@ -4,8 +4,6 @@ IntlGregorianCalendar::__construct(): basic
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -48,4 +46,4 @@ string(5) "pt_PT"
string(12) "Europe/Paris"
string(5) "fr_CA"
string(9) "gregorian"
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/idn.phpt b/ext/intl/tests/idn.phpt
index 5400cd487a..8e004ec2e2 100644
--- a/ext/intl/tests/idn.phpt
+++ b/ext/intl/tests/idn.phpt
@@ -14,8 +14,5 @@ echo urlencode(idn_to_utf8('xn--tst-qla.de'))."\n";
?>
--EXPECTF--
-Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in %s on line %d
xn--tst-qla.de
-
-Deprecated: idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated in %s on line %d
t%C3%A4st.de
diff --git a/ext/intl/tests/intl_icu_data_version_constant.phpt b/ext/intl/tests/intl_icu_data_version_constant.phpt
index ad01218586..1ff9239ffd 100644
--- a/ext/intl/tests/intl_icu_data_version_constant.phpt
+++ b/ext/intl/tests/intl_icu_data_version_constant.phpt
@@ -1,7 +1,7 @@
--TEST--
INTL_ICU_DATA_VERSION constant
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) || version_compare('INTL_ICU_VERSION', '4.4', '<') ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
var_dump(defined("INTL_ICU_DATA_VERSION"));
diff --git a/ext/intl/tests/locale_filter_matches.phpt b/ext/intl/tests/locale_filter_matches.phpt
deleted file mode 100644
index 5f4a9457c5..0000000000
--- a/ext/intl/tests/locale_filter_matches.phpt
+++ /dev/null
@@ -1,366 +0,0 @@
---TEST--
-locale_filter_matches.phpt() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try parsing different Locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $loc_ranges = array(
- 'de-de',
- 'sl_IT',
- 'sl_IT_Nedis',
- 'jbo',
- 'art-lojban',
- 'sl_IT'
- );
-
- $lang_tags = array(
- 'de-DEVA',
- 'de-DE-1996',
- 'de-DE',
- 'zh_Hans',
- 'de-CH-1996',
- 'sl_IT',
- 'sl_IT_nedis-a-kirti-x-xyz',
- 'sl_IT_rozaj',
- 'sl_IT_NEDIS_ROJAZ_1901',
- 'i-enochian',
- 'sgn-CH-de',
- 'art-lojban',
- 'i-lux',
- 'art-lojban',
- 'jbo',
- 'en_sl_IT'
- );
-
- $res_str = '';
- $isCanonical = false;
- foreach($loc_ranges as $loc_range){
- foreach($lang_tags as $lang_tag){
- $res_str .="--------------\n";
- $result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , $isCanonical);
- $res_str .= "loc_range:$loc_range matches lang_tag $lang_tag ? ";
- if( $result){
- $res_str .= "YES\n";
- }else{
- $res_str .= "NO\n";
- }
-//canonicalized version
- $result= ut_loc_locale_filter_matches( $lang_tag , $loc_range , !($isCanonical));
- $can_loc_range = ut_loc_canonicalize($loc_range);
- $can_lang_tag = ut_loc_canonicalize($lang_tag);
- $res_str .= "loc_range:$can_loc_range canonically matches lang_tag $can_lang_tag ? ";
- if( $result){
- $res_str .= "YES\n";
- }else{
- $res_str .= "NO\n";
- }
- }
- }
-
- $res_str .= "\n";
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECT--
---------------
-loc_range:de-de matches lang_tag de-DEVA ? NO
-loc_range:de_DE canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:de-de matches lang_tag de-DE-1996 ? YES
-loc_range:de_DE canonically matches lang_tag de_DE_1996 ? YES
---------------
-loc_range:de-de matches lang_tag de-DE ? YES
-loc_range:de_DE canonically matches lang_tag de_DE ? YES
---------------
-loc_range:de-de matches lang_tag zh_Hans ? NO
-loc_range:de_DE canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:de-de matches lang_tag de-CH-1996 ? NO
-loc_range:de_DE canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:de-de matches lang_tag sl_IT ? NO
-loc_range:de_DE canonically matches lang_tag sl_IT ? NO
---------------
-loc_range:de-de matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
-loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
---------------
-loc_range:de-de matches lang_tag sl_IT_rozaj ? NO
-loc_range:de_DE canonically matches lang_tag sl_IT_ROZAJ ? NO
---------------
-loc_range:de-de matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
-loc_range:de_DE canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
---------------
-loc_range:de-de matches lang_tag i-enochian ? NO
-loc_range:de_DE canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:de-de matches lang_tag sgn-CH-de ? NO
-loc_range:de_DE canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:de-de matches lang_tag art-lojban ? NO
-loc_range:de_DE canonically matches lang_tag jbo ? NO
---------------
-loc_range:de-de matches lang_tag i-lux ? NO
-loc_range:de_DE canonically matches lang_tag i-lux ? NO
---------------
-loc_range:de-de matches lang_tag art-lojban ? NO
-loc_range:de_DE canonically matches lang_tag jbo ? NO
---------------
-loc_range:de-de matches lang_tag jbo ? NO
-loc_range:de_DE canonically matches lang_tag jbo ? NO
---------------
-loc_range:de-de matches lang_tag en_sl_IT ? NO
-loc_range:de_DE canonically matches lang_tag en_SL_IT ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DEVA ? NO
-loc_range:sl_IT canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DE-1996 ? NO
-loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DE ? NO
-loc_range:sl_IT canonically matches lang_tag de_DE ? NO
---------------
-loc_range:sl_IT matches lang_tag zh_Hans ? NO
-loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:sl_IT matches lang_tag de-CH-1996 ? NO
-loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:sl_IT matches lang_tag sl_IT ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
---------------
-loc_range:sl_IT matches lang_tag i-enochian ? NO
-loc_range:sl_IT canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:sl_IT matches lang_tag sgn-CH-de ? NO
-loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:sl_IT matches lang_tag art-lojban ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag i-lux ? NO
-loc_range:sl_IT canonically matches lang_tag i-lux ? NO
---------------
-loc_range:sl_IT matches lang_tag art-lojban ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag jbo ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag en_sl_IT ? NO
-loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag de-DEVA ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag de-DE-1996 ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE_1996 ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag de-DE ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag de_DE ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag zh_Hans ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag de-CH-1996 ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag sl_IT ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
-loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
---------------
-loc_range:sl_IT_Nedis matches lang_tag sl_IT_rozaj ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_ROZAJ ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
-loc_range:sl_IT_NEDIS canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
---------------
-loc_range:sl_IT_Nedis matches lang_tag i-enochian ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag sgn-CH-de ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag i-lux ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag i-lux ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag art-lojban ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag jbo ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT_Nedis matches lang_tag en_sl_IT ? NO
-loc_range:sl_IT_NEDIS canonically matches lang_tag en_SL_IT ? NO
---------------
-loc_range:jbo matches lang_tag de-DEVA ? NO
-loc_range:jbo canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:jbo matches lang_tag de-DE-1996 ? NO
-loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO
---------------
-loc_range:jbo matches lang_tag de-DE ? NO
-loc_range:jbo canonically matches lang_tag de_DE ? NO
---------------
-loc_range:jbo matches lang_tag zh_Hans ? NO
-loc_range:jbo canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:jbo matches lang_tag de-CH-1996 ? NO
-loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:jbo matches lang_tag sl_IT ? NO
-loc_range:jbo canonically matches lang_tag sl_IT ? NO
---------------
-loc_range:jbo matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
---------------
-loc_range:jbo matches lang_tag sl_IT_rozaj ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO
---------------
-loc_range:jbo matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
---------------
-loc_range:jbo matches lang_tag i-enochian ? NO
-loc_range:jbo canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:jbo matches lang_tag sgn-CH-de ? NO
-loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:jbo matches lang_tag art-lojban ? NO
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:jbo matches lang_tag i-lux ? NO
-loc_range:jbo canonically matches lang_tag i-lux ? NO
---------------
-loc_range:jbo matches lang_tag art-lojban ? NO
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:jbo matches lang_tag jbo ? YES
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:jbo matches lang_tag en_sl_IT ? NO
-loc_range:jbo canonically matches lang_tag en_SL_IT ? NO
---------------
-loc_range:art-lojban matches lang_tag de-DEVA ? NO
-loc_range:jbo canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:art-lojban matches lang_tag de-DE-1996 ? NO
-loc_range:jbo canonically matches lang_tag de_DE_1996 ? NO
---------------
-loc_range:art-lojban matches lang_tag de-DE ? NO
-loc_range:jbo canonically matches lang_tag de_DE ? NO
---------------
-loc_range:art-lojban matches lang_tag zh_Hans ? NO
-loc_range:jbo canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:art-lojban matches lang_tag de-CH-1996 ? NO
-loc_range:jbo canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:art-lojban matches lang_tag sl_IT ? NO
-loc_range:jbo canonically matches lang_tag sl_IT ? NO
---------------
-loc_range:art-lojban matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? NO
---------------
-loc_range:art-lojban matches lang_tag sl_IT_rozaj ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_ROZAJ ? NO
---------------
-loc_range:art-lojban matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
-loc_range:jbo canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? NO
---------------
-loc_range:art-lojban matches lang_tag i-enochian ? NO
-loc_range:jbo canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:art-lojban matches lang_tag sgn-CH-de ? NO
-loc_range:jbo canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:art-lojban matches lang_tag art-lojban ? YES
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:art-lojban matches lang_tag i-lux ? NO
-loc_range:jbo canonically matches lang_tag i-lux ? NO
---------------
-loc_range:art-lojban matches lang_tag art-lojban ? YES
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:art-lojban matches lang_tag jbo ? NO
-loc_range:jbo canonically matches lang_tag jbo ? YES
---------------
-loc_range:art-lojban matches lang_tag en_sl_IT ? NO
-loc_range:jbo canonically matches lang_tag en_SL_IT ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DEVA ? NO
-loc_range:sl_IT canonically matches lang_tag de_Deva ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DE-1996 ? NO
-loc_range:sl_IT canonically matches lang_tag de_DE_1996 ? NO
---------------
-loc_range:sl_IT matches lang_tag de-DE ? NO
-loc_range:sl_IT canonically matches lang_tag de_DE ? NO
---------------
-loc_range:sl_IT matches lang_tag zh_Hans ? NO
-loc_range:sl_IT canonically matches lang_tag zh_Hans ? NO
---------------
-loc_range:sl_IT matches lang_tag de-CH-1996 ? NO
-loc_range:sl_IT canonically matches lang_tag de_CH_1996 ? NO
---------------
-loc_range:sl_IT matches lang_tag sl_IT ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_nedis-a-kirti-x-xyz ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_A_KIRTI_X_XYZ ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_rozaj ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_ROZAJ ? YES
---------------
-loc_range:sl_IT matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
-loc_range:sl_IT canonically matches lang_tag sl_IT_NEDIS_ROJAZ_1901 ? YES
---------------
-loc_range:sl_IT matches lang_tag i-enochian ? NO
-loc_range:sl_IT canonically matches lang_tag i-enochian ? NO
---------------
-loc_range:sl_IT matches lang_tag sgn-CH-de ? NO
-loc_range:sl_IT canonically matches lang_tag sgn_CH_DE ? NO
---------------
-loc_range:sl_IT matches lang_tag art-lojban ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag i-lux ? NO
-loc_range:sl_IT canonically matches lang_tag i-lux ? NO
---------------
-loc_range:sl_IT matches lang_tag art-lojban ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag jbo ? NO
-loc_range:sl_IT canonically matches lang_tag jbo ? NO
---------------
-loc_range:sl_IT matches lang_tag en_sl_IT ? NO
-loc_range:sl_IT canonically matches lang_tag en_SL_IT ? NO
diff --git a/ext/intl/tests/locale_filter_matches2.phpt b/ext/intl/tests/locale_filter_matches2.phpt
index 3ce8603028..e75079deb3 100644
--- a/ext/intl/tests/locale_filter_matches2.phpt
+++ b/ext/intl/tests/locale_filter_matches2.phpt
@@ -1,8 +1,7 @@
--TEST--
locale_filter_matches.phpt() icu >= 4.8 && icu < 50.1.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_name.phpt b/ext/intl/tests/locale_get_display_name.phpt
deleted file mode 100644
index ee921020af..0000000000
--- a/ext/intl/tests/locale_get_display_name.phpt
+++ /dev/null
@@ -1,342 +0,0 @@
---TEST--
-locale_get_display_name() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the display_name for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str='';
-
- $disp_locales=array('en','fr','de');
-
- $locales = array(
- 'sl_IT_nedis_KIRTI',
- 'sl_IT_nedis-a-kirti-x-xyz',
- 'sl_IT_rozaj',
- 'sl_IT_NEDIS_ROJAZ_1901',
- 'i-enochian',
- 'zh-hakka',
- 'zh-wuu',
- 'i-tay',
- 'sgn-BE-nl',
- 'sgn-CH-de',
- 'sl_IT_rozaj@currency=EUR',
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $res_str .= "locale='$locale'\n";
- foreach( $disp_locales as $disp_locale )
- {
- $scr = ut_loc_get_display_name( $locale ,$disp_locale );
- $scr = str_replace(array('(', ')'), '#', $scr);
- $res_str .= "disp_locale=$disp_locale : display_name=$scr";
- $res_str .= "\n";
- }
- $res_str .= "-----------------\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTREGEX--
-locale='sl_IT_nedis_KIRTI'
-disp_locale=en : display_name=Slovenian #Italy, NEDIS_KIRTI#
-disp_locale=fr : display_name=slovène #Italie, NEDIS_KIRTI#
-disp_locale=de : display_name=Slowenisch #Italien, NEDIS_KIRTI#
------------------
-locale='sl_IT_nedis-a-kirti-x-xyz'
-disp_locale=en : display_name=Slovenian #Italy, NEDIS_A_KIRTI_X_XYZ#
-disp_locale=fr : display_name=slovène #Italie, NEDIS_A_KIRTI_X_XYZ#
-disp_locale=de : display_name=Slowenisch #Italien, NEDIS_A_KIRTI_X_XYZ#
------------------
-locale='sl_IT_rozaj'
-disp_locale=en : display_name=Slovenian #Italy, Resian#
-disp_locale=fr : display_name=slovène #Italie, dialecte de Resia#
-disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch)#
------------------
-locale='sl_IT_NEDIS_ROJAZ_1901'
-disp_locale=en : display_name=Slovenian #Italy, NEDIS_ROJAZ_1901#
-disp_locale=fr : display_name=slovène #Italie, NEDIS_ROJAZ_1901#
-disp_locale=de : display_name=Slowenisch #Italien, NEDIS_ROJAZ_1901#
------------------
-locale='i-enochian'
-disp_locale=en : display_name=i-enochian
-disp_locale=fr : display_name=i-enochian
-disp_locale=de : display_name=i-enochian
------------------
-locale='zh-hakka'
-disp_locale=en : display_name=Chinese( #HAKKA#)?
-disp_locale=fr : display_name=chinois( #HAKKA#)?
-disp_locale=de : display_name=Chinesisch( #HAKKA#)?
------------------
-locale='zh-wuu'
-disp_locale=en : display_name=Chinese #WUU#
-disp_locale=fr : display_name=chinois #WUU#
-disp_locale=de : display_name=Chinesisch #WUU#
------------------
-locale='i-tay'
-disp_locale=en : display_name=i-tay
-disp_locale=fr : display_name=i-tay
-disp_locale=de : display_name=i-tay
------------------
-locale='sgn-BE-nl'
-disp_locale=en : display_name=Sign Languages? #Belgium, NL#
-disp_locale=fr : display_name=langues? des signes #Belgique, NL#
-disp_locale=de : display_name=Gebärdensprache #Belgien, NL#
------------------
-locale='sgn-CH-de'
-disp_locale=en : display_name=Sign Languages? #Switzerland, DE#
-disp_locale=fr : display_name=langues? des signes #Suisse, DE#
-disp_locale=de : display_name=Gebärdensprache #Schweiz, DE#
------------------
-locale='sl_IT_rozaj@currency=EUR'
-disp_locale=en : display_name=Slovenian #Italy, Resian, [Cc]urrency=Euro#
-disp_locale=fr : display_name=slovène #Italie, dialecte de Resia, Devise=euro#
-disp_locale=de : display_name=Slowenisch #Italien, (ROZAJ|Resianisch), Währung=Euro#
------------------
-locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-disp_locale=en : display_name=Ukrainian #Ukraine, CALIFORNIA, [Cc]urrency#
-disp_locale=fr : display_name=ukrainien #Ukraine, CALIFORNIA, Devise#
-disp_locale=de : display_name=Ukrainisch #Ukraine, CALIFORNIA, Währung#
------------------
-locale='root'
-disp_locale=en : display_name=Root
-disp_locale=fr : display_name=racine
-disp_locale=de : display_name=[Rr]oot
------------------
-locale='uk@currency=EURO'
-disp_locale=en : display_name=Ukrainian #[Cc]urrency=EURO#
-disp_locale=fr : display_name=ukrainien #Devise=EURO#
-disp_locale=de : display_name=Ukrainisch #Währung=EURO#
------------------
-locale='Hindi'
-disp_locale=en : display_name=hindi
-disp_locale=fr : display_name=hindi
-disp_locale=de : display_name=hindi
------------------
-locale='de'
-disp_locale=en : display_name=German
-disp_locale=fr : display_name=allemand
-disp_locale=de : display_name=Deutsch
------------------
-locale='fr'
-disp_locale=en : display_name=French
-disp_locale=fr : display_name=français
-disp_locale=de : display_name=Französisch
------------------
-locale='ja'
-disp_locale=en : display_name=Japanese
-disp_locale=fr : display_name=japonais
-disp_locale=de : display_name=Japanisch
------------------
-locale='i-enochian'
-disp_locale=en : display_name=i-enochian
-disp_locale=fr : display_name=i-enochian
-disp_locale=de : display_name=i-enochian
------------------
-locale='zh-Hant'
-disp_locale=en : display_name=Chinese #Traditional Han#
-disp_locale=fr : display_name=chinois #idéogrammes han (#variante traditionnelle#|traditionnels)#
-disp_locale=de : display_name=Chinesisch #Traditionelle Chinesische Schrift#
------------------
-locale='zh-Hans'
-disp_locale=en : display_name=Chinese #Simplified Han#
-disp_locale=fr : display_name=chinois #idéogrammes han (#variante simplifiée#|simplifiés)#
-disp_locale=de : display_name=Chinesisch #Vereinfachte Chinesische Schrift#
------------------
-locale='sr-Cyrl'
-disp_locale=en : display_name=Serbian #Cyrillic#
-disp_locale=fr : display_name=serbe #cyrillique#
-disp_locale=de : display_name=Serbisch #Kyrillisch#
------------------
-locale='sr-Latn'
-disp_locale=en : display_name=Serbian #Latin#
-disp_locale=fr : display_name=serbe #latin#
-disp_locale=de : display_name=Serbisch #Lateinisch#
------------------
-locale='zh-Hans-CN'
-disp_locale=en : display_name=Chinese #Simplified Han, China#
-disp_locale=fr : display_name=chinois #idéogrammes han (#variante simplifiée#|simplifiés), Chine#
-disp_locale=de : display_name=Chinesisch #Vereinfachte Chinesische Schrift, China#
------------------
-locale='sr-Latn-CS'
-disp_locale=en : display_name=Serbian #Latin, Serbia [aA]nd Montenegro#
-disp_locale=fr : display_name=serbe #latin, Serbie-et-Monténégro#
-disp_locale=de : display_name=Serbisch #Lateinisch, Serbien und Montenegro#
------------------
-locale='sl-rozaj'
-disp_locale=en : display_name=Slovenian( #ROZAJ#)?
-disp_locale=fr : display_name=slovène( #ROZAJ#)?
-disp_locale=de : display_name=Slowenisch( #(ROZAJ|Resianisch)#)?
------------------
-locale='sl-nedis'
-disp_locale=en : display_name=Slovenian( #NEDIS#)?
-disp_locale=fr : display_name=slovène( #NEDIS#)?
-disp_locale=de : display_name=Slowenisch( #NEDIS#)?
------------------
-locale='de-CH-1901'
-disp_locale=en : display_name=German #Switzerland, Traditional German orthography#
-disp_locale=fr : display_name=allemand #Suisse, orthographe allemande traditionnelle#
-disp_locale=de : display_name=Deutsch #Schweiz, (1901|[aA]lte deutsche Rechtschreibung)#
------------------
-locale='sl-IT-nedis'
-disp_locale=en : display_name=Slovenian #Italy, Natisone dialect#
-disp_locale=fr : display_name=slovène #Italie, dialecte de Natisone#
-disp_locale=de : display_name=Slowenisch #Italien, (NEDIS|Natisone-Dialekt)#
------------------
-locale='sl-Latn-IT-nedis'
-disp_locale=en : display_name=Slovenian #Latin, Italy, Natisone dialect#
-disp_locale=fr : display_name=slovène #latin, Italie, dialecte de Natisone#
-disp_locale=de : display_name=Slowenisch #Lateinisch, Italien, (NEDIS|Natisone-Dialekt)#
------------------
-locale='de-DE'
-disp_locale=en : display_name=German #Germany#
-disp_locale=fr : display_name=allemand #Allemagne#
-disp_locale=de : display_name=Deutsch #Deutschland#
------------------
-locale='en-US'
-disp_locale=en : display_name=English #United States#
-disp_locale=fr : display_name=anglais #États-Unis#
-disp_locale=de : display_name=Englisch #Vereinigte Staaten#
------------------
-locale='es-419'
-disp_locale=en : display_name=Spanish #Latin America and the Caribbean#
-disp_locale=fr : display_name=espagnol #Amérique latine et Caraïbes#
-disp_locale=de : display_name=Spanisch #Lateinamerika und Karibik#
------------------
-locale='de-CH-x-phonebk'
-disp_locale=en : display_name=German #Switzerland, X_PHONEBK#
-disp_locale=fr : display_name=allemand #Suisse, X_PHONEBK#
-disp_locale=de : display_name=Deutsch #Schweiz, X_PHONEBK#
------------------
-locale='az-Arab-x-AZE-derbend'
-disp_locale=en : display_name=Azerbaijani #Arabic(, X, AZE_DERBEND)?#
-disp_locale=fr : display_name=azéri #arabe(, X, AZE_DERBEND)?#
-disp_locale=de : display_name=Aserbaidschanisch #Arabisch(, X, AZE_DERBEND)?#
------------------
-locale='zh-min'
-disp_locale=en : display_name=Chinese #MIN#
-disp_locale=fr : display_name=chinois #MIN#
-disp_locale=de : display_name=Chinesisch #MIN#
------------------
-locale='zh-min-nan-Hant-CN'
-disp_locale=en : display_name=Chinese #MIN, NAN_HANT_CN#
-disp_locale=fr : display_name=chinois #MIN, NAN_HANT_CN#
-disp_locale=de : display_name=Chinesisch #MIN, NAN_HANT_CN#
------------------
-locale='x-whatever'
-disp_locale=en : display_name=x-whatever
-disp_locale=fr : display_name=x-whatever
-disp_locale=de : display_name=x-whatever
------------------
-locale='qaa-Qaaa-QM-x-southern'
-disp_locale=en : display_name=qaa #Qaaa, QM, X_SOUTHERN#
-disp_locale=fr : display_name=qaa #Qaaa, QM, X_SOUTHERN#
-disp_locale=de : display_name=qaa #Qaaa, QM, X_SOUTHERN#
------------------
-locale='sr-Latn-QM'
-disp_locale=en : display_name=Serbian #Latin, QM#
-disp_locale=fr : display_name=serbe #latin, QM#
-disp_locale=de : display_name=Serbisch #Lateinisch, QM#
------------------
-locale='sr-Qaaa-CS'
-disp_locale=en : display_name=Serbian #Qaaa, Serbia [aA]nd Montenegro#
-disp_locale=fr : display_name=serbe #Qaaa, Serbie-et-Monténégro#
-disp_locale=de : display_name=Serbisch #Qaaa, Serbien und Montenegro#
------------------
-locale='en-US-u-islamCal'
-disp_locale=en : display_name=English #United States, U_ISLAMCAL#
-disp_locale=fr : display_name=anglais #États-Unis, U_ISLAMCAL#
-disp_locale=de : display_name=Englisch #Vereinigte Staaten, U_ISLAMCAL#
------------------
-locale='zh-CN-a-myExt-x-private'
-disp_locale=en : display_name=Chinese #China, A_MYEXT_X_PRIVATE#
-disp_locale=fr : display_name=chinois #Chine, A_MYEXT_X_PRIVATE#
-disp_locale=de : display_name=Chinesisch #China, A_MYEXT_X_PRIVATE#
------------------
-locale='en-a-myExt-b-another'
-disp_locale=en : display_name=English( #A, MYEXT_B_ANOTHER#)?
-disp_locale=fr : display_name=anglais( #A, MYEXT_B_ANOTHER#)?
-disp_locale=de : display_name=Englisch( #A, MYEXT_B_ANOTHER#)?
------------------
-locale='de-419-DE'
-disp_locale=en : display_name=German #Latin America and the Caribbean, DE#
-disp_locale=fr : display_name=allemand #Amérique latine et Caraïbes, DE#
-disp_locale=de : display_name=Deutsch #Lateinamerika und Karibik, DE#
------------------
-locale='a-DE'
-disp_locale=en : display_name=a #Germany#
-disp_locale=fr : display_name=a #Allemagne#
-disp_locale=de : display_name=a #Deutschland#
------------------
-locale='ar-a-aaa-b-bbb-a-ccc'
-disp_locale=en : display_name=Arabic( #A, AAA_B_BBB_A_CCC#)?
-disp_locale=fr : display_name=arabe( #A, AAA_B_BBB_A_CCC#)?
-disp_locale=de : display_name=Arabisch( #A, AAA_B_BBB_A_CCC#)?
------------------
diff --git a/ext/intl/tests/locale_get_display_name2.phpt b/ext/intl/tests/locale_get_display_name2.phpt
index 0b0bc6c321..313e89b3c0 100644
--- a/ext/intl/tests/locale_get_display_name2.phpt
+++ b/ext/intl/tests/locale_get_display_name2.phpt
@@ -1,8 +1,7 @@
--TEST--
locale_get_display_name() icu >= 4.8 && icu < 50.1.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_region.phpt b/ext/intl/tests/locale_get_display_region.phpt
deleted file mode 100644
index 9a6e75d94a..0000000000
--- a/ext/intl/tests/locale_get_display_region.phpt
+++ /dev/null
@@ -1,275 +0,0 @@
---TEST--
-locale_get_display_region() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the display_region for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $disp_locales=array('en','fr','de');
-
- $locales = array(
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $res_str .= "locale='$locale'\n";
- foreach( $disp_locales as $disp_locale )
- {
- $scr = ut_loc_get_display_region( $locale ,$disp_locale );
- $res_str .= "disp_locale=$disp_locale : display_region=$scr";
- $res_str .= "\n";
- }
- $res_str .= "-----------------\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTREGEX--
-locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-disp_locale=en : display_region=Ukraine
-disp_locale=fr : display_region=Ukraine
-disp_locale=de : display_region=Ukraine
------------------
-locale='root'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='uk@currency=EURO'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='Hindi'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='de'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='fr'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='ja'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='i-enochian'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='zh-Hant'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='zh-Hans'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='sr-Cyrl'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='sr-Latn'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='zh-Hans-CN'
-disp_locale=en : display_region=China
-disp_locale=fr : display_region=Chine
-disp_locale=de : display_region=China
------------------
-locale='sr-Latn-CS'
-disp_locale=en : display_region=Serbia [Aa]nd Montenegro
-disp_locale=fr : display_region=Serbie-et-Monténégro
-disp_locale=de : display_region=Serbien und Montenegro
------------------
-locale='sl-rozaj'
-disp_locale=en : display_region=(ROZAJ)?
-disp_locale=fr : display_region=(ROZAJ)?
-disp_locale=de : display_region=(ROZAJ)?
------------------
-locale='sl-nedis'
-disp_locale=en : display_region=(NEDIS)?
-disp_locale=fr : display_region=(NEDIS)?
-disp_locale=de : display_region=(NEDIS)?
------------------
-locale='de-CH-1901'
-disp_locale=en : display_region=Switzerland
-disp_locale=fr : display_region=Suisse
-disp_locale=de : display_region=Schweiz
------------------
-locale='sl-IT-nedis'
-disp_locale=en : display_region=Italy
-disp_locale=fr : display_region=Italie
-disp_locale=de : display_region=Italien
------------------
-locale='sl-Latn-IT-nedis'
-disp_locale=en : display_region=Italy
-disp_locale=fr : display_region=Italie
-disp_locale=de : display_region=Italien
------------------
-locale='de-DE'
-disp_locale=en : display_region=Germany
-disp_locale=fr : display_region=Allemagne
-disp_locale=de : display_region=Deutschland
------------------
-locale='en-US'
-disp_locale=en : display_region=United States
-disp_locale=fr : display_region=États-Unis
-disp_locale=de : display_region=Vereinigte Staaten
------------------
-locale='es-419'
-disp_locale=en : display_region=Latin America and the Caribbean
-disp_locale=fr : display_region=Amérique latine et Caraïbes
-disp_locale=de : display_region=Lateinamerika und Karibik
------------------
-locale='de-CH-x-phonebk'
-disp_locale=en : display_region=Switzerland
-disp_locale=fr : display_region=Suisse
-disp_locale=de : display_region=Schweiz
------------------
-locale='az-Arab-x-AZE-derbend'
-disp_locale=en : display_region=X?
-disp_locale=fr : display_region=X?
-disp_locale=de : display_region=X?
------------------
-locale='zh-min'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='zh-min-nan-Hant-CN'
-disp_locale=en : display_region=MIN
-disp_locale=fr : display_region=MIN
-disp_locale=de : display_region=MIN
------------------
-locale='x-whatever'
-disp_locale=en : display_region=
-disp_locale=fr : display_region=
-disp_locale=de : display_region=
------------------
-locale='qaa-Qaaa-QM-x-southern'
-disp_locale=en : display_region=QM
-disp_locale=fr : display_region=QM
-disp_locale=de : display_region=QM
------------------
-locale='sr-Latn-QM'
-disp_locale=en : display_region=QM
-disp_locale=fr : display_region=QM
-disp_locale=de : display_region=QM
------------------
-locale='sr-Qaaa-CS'
-disp_locale=en : display_region=Serbia [Aa]nd Montenegro
-disp_locale=fr : display_region=Serbie-et-Monténégro
-disp_locale=de : display_region=Serbien und Montenegro
------------------
-locale='en-US-u-islamCal'
-disp_locale=en : display_region=United States
-disp_locale=fr : display_region=États-Unis
-disp_locale=de : display_region=Vereinigte Staaten
------------------
-locale='zh-CN-a-myExt-x-private'
-disp_locale=en : display_region=China
-disp_locale=fr : display_region=Chine
-disp_locale=de : display_region=China
------------------
-locale='en-a-myExt-b-another'
-disp_locale=en : display_region=A?
-disp_locale=fr : display_region=A?
-disp_locale=de : display_region=A?
------------------
-locale='de-419-DE'
-disp_locale=en : display_region=Latin America and the Caribbean
-disp_locale=fr : display_region=Amérique latine et Caraïbes
-disp_locale=de : display_region=Lateinamerika und Karibik
------------------
-locale='a-DE'
-disp_locale=en : display_region=Germany
-disp_locale=fr : display_region=Allemagne
-disp_locale=de : display_region=Deutschland
------------------
-locale='ar-a-aaa-b-bbb-a-ccc'
-disp_locale=en : display_region=A?
-disp_locale=fr : display_region=A?
-disp_locale=de : display_region=A?
------------------
diff --git a/ext/intl/tests/locale_get_display_region2.phpt b/ext/intl/tests/locale_get_display_region2.phpt
index 82334db461..56003cc9a2 100644
--- a/ext/intl/tests/locale_get_display_region2.phpt
+++ b/ext/intl/tests/locale_get_display_region2.phpt
@@ -1,9 +1,8 @@
--TEST--
locale_get_display_region() icu >= 4.8 && icu < 51.2
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
-<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU <= 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_script.phpt b/ext/intl/tests/locale_get_display_script.phpt
deleted file mode 100644
index 0440dfb204..0000000000
--- a/ext/intl/tests/locale_get_display_script.phpt
+++ /dev/null
@@ -1,275 +0,0 @@
---TEST--
-locale_get_display_script() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the display_script for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $disp_locales=array('en','fr','de');
-
- $locales = array(
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $res_str .= "locale='$locale'\n";
- foreach( $disp_locales as $disp_locale )
- {
- $scr = ut_loc_get_display_script( $locale ,$disp_locale );
- $res_str .= "disp_locale=$disp_locale : display_script=$scr";
- $res_str .= "\n";
- }
- $res_str .= "-----------------\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTREGEX--
-locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='root'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='uk@currency=EURO'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='Hindi'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='fr'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='ja'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='i-enochian'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-Hant'
-disp_locale=en : display_script=Traditional Han
-disp_locale=fr : display_script=idéogrammes han (\(variante traditionnelle\)|traditionnels)
-disp_locale=de : display_script=Traditionelle Chinesische Schrift
------------------
-locale='zh-Hans'
-disp_locale=en : display_script=Simplified Han
-disp_locale=fr : display_script=idéogrammes han (\(variante simplifiée\)|simplifiés)
-disp_locale=de : display_script=Vereinfachte Chinesische Schrift
------------------
-locale='sr-Cyrl'
-disp_locale=en : display_script=Cyrillic
-disp_locale=fr : display_script=cyrillique
-disp_locale=de : display_script=Kyrillisch
------------------
-locale='sr-Latn'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='zh-Hans-CN'
-disp_locale=en : display_script=Simplified Han
-disp_locale=fr : display_script=idéogrammes han (\(variante simplifiée\)|simplifiés)
-disp_locale=de : display_script=Vereinfachte Chinesische Schrift
------------------
-locale='sr-Latn-CS'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='sl-rozaj'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-nedis'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-CH-1901'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-IT-nedis'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-Latn-IT-nedis'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='de-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='en-US'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='es-419'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-CH-x-phonebk'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='az-Arab-x-AZE-derbend'
-disp_locale=en : display_script=Arabic
-disp_locale=fr : display_script=arabe
-disp_locale=de : display_script=Arabisch
------------------
-locale='zh-min'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-min-nan-Hant-CN'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='x-whatever'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='qaa-Qaaa-QM-x-southern'
-disp_locale=en : display_script=Qaaa
-disp_locale=fr : display_script=Qaaa
-disp_locale=de : display_script=Qaaa
------------------
-locale='sr-Latn-QM'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='sr-Qaaa-CS'
-disp_locale=en : display_script=Qaaa
-disp_locale=fr : display_script=Qaaa
-disp_locale=de : display_script=Qaaa
------------------
-locale='en-US-u-islamCal'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-CN-a-myExt-x-private'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='en-a-myExt-b-another'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-419-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='a-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='ar-a-aaa-b-bbb-a-ccc'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
diff --git a/ext/intl/tests/locale_get_display_script2.phpt b/ext/intl/tests/locale_get_display_script2.phpt
deleted file mode 100644
index 2b9e037b78..0000000000
--- a/ext/intl/tests/locale_get_display_script2.phpt
+++ /dev/null
@@ -1,275 +0,0 @@
---TEST--
-locale_get_display_script() icu = 4.8
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0 || version_compare(INTL_ICU_VERSION, '49') >= 0) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the display_script for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $disp_locales=array('en','fr','de');
-
- $locales = array(
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $res_str .= "locale='$locale'\n";
- foreach( $disp_locales as $disp_locale )
- {
- $scr = ut_loc_get_display_script( $locale ,$disp_locale );
- $res_str .= "disp_locale=$disp_locale : display_script=$scr";
- $res_str .= "\n";
- }
- $res_str .= "-----------------\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTREGEX--
-locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='root'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='uk@currency=EURO'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='Hindi'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='fr'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='ja'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='i-enochian'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-Hant'
-disp_locale=en : display_script=Traditional
-disp_locale=fr : display_script=idéogrammes han (\(variante traditionnelle\)|traditionnels)
-disp_locale=de : display_script=Traditionell
------------------
-locale='zh-Hans'
-disp_locale=en : display_script=Simplified
-disp_locale=fr : display_script=idéogrammes han (\(variante simplifiée\)|simplifiés)
-disp_locale=de : display_script=Vereinfacht
------------------
-locale='sr-Cyrl'
-disp_locale=en : display_script=Cyrillic
-disp_locale=fr : display_script=cyrillique
-disp_locale=de : display_script=Kyrillisch
------------------
-locale='sr-Latn'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='zh-Hans-CN'
-disp_locale=en : display_script=Simplified
-disp_locale=fr : display_script=idéogrammes han (\(variante simplifiée\)|simplifiés)
-disp_locale=de : display_script=Vereinfacht
------------------
-locale='sr-Latn-CS'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='sl-rozaj'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-nedis'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-CH-1901'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-IT-nedis'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='sl-Latn-IT-nedis'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='de-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='en-US'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='es-419'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-CH-x-phonebk'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='az-Arab-x-AZE-derbend'
-disp_locale=en : display_script=Arabic
-disp_locale=fr : display_script=arabe
-disp_locale=de : display_script=Arabisch
------------------
-locale='zh-min'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-min-nan-Hant-CN'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='x-whatever'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='qaa-Qaaa-QM-x-southern'
-disp_locale=en : display_script=Qaaa
-disp_locale=fr : display_script=Qaaa
-disp_locale=de : display_script=Qaaa
------------------
-locale='sr-Latn-QM'
-disp_locale=en : display_script=Latin
-disp_locale=fr : display_script=latin
-disp_locale=de : display_script=Lateinisch
------------------
-locale='sr-Qaaa-CS'
-disp_locale=en : display_script=Qaaa
-disp_locale=fr : display_script=Qaaa
-disp_locale=de : display_script=Qaaa
------------------
-locale='en-US-u-islamCal'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='zh-CN-a-myExt-x-private'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='en-a-myExt-b-another'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='de-419-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='a-DE'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
-locale='ar-a-aaa-b-bbb-a-ccc'
-disp_locale=en : display_script=
-disp_locale=fr : display_script=
-disp_locale=de : display_script=
------------------
diff --git a/ext/intl/tests/locale_get_display_script3.phpt b/ext/intl/tests/locale_get_display_script3.phpt
index 972f060cdb..f29cb4b6cf 100644
--- a/ext/intl/tests/locale_get_display_script3.phpt
+++ b/ext/intl/tests/locale_get_display_script3.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_get_display_script() icu >= 49
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '49') < 0 || version_compare(INTL_ICU_VERSION, '52.1') >= 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if (version_compare(INTL_ICU_VERSION, '52.1') >= 0) die('skip for ICU < 52.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_script4.phpt b/ext/intl/tests/locale_get_display_script4.phpt
index dd50dcfc0a..9577b34b08 100644
--- a/ext/intl/tests/locale_get_display_script4.phpt
+++ b/ext/intl/tests/locale_get_display_script4.phpt
@@ -1,8 +1,8 @@
--TEST--
locale_get_display_script() icu >= 52.1
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if(version_compare(INTL_ICU_VERSION, '52.1') < 0) print 'skip for ICU >= 52.1'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_display_variant.phpt b/ext/intl/tests/locale_get_display_variant.phpt
deleted file mode 100644
index 9f72ee0498..0000000000
--- a/ext/intl/tests/locale_get_display_variant.phpt
+++ /dev/null
@@ -1,275 +0,0 @@
---TEST--
-locale_get_display_variant() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the display_variant for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $disp_locales=array('en','fr','de');
-
- $locales = array(
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $res_str .= "locale='$locale'\n";
- foreach( $disp_locales as $disp_locale )
- {
- $scr = ut_loc_get_display_variant( $locale ,$disp_locale );
- $res_str .= "disp_locale=$disp_locale : display_variant=$scr";
- $res_str .= "\n";
- }
- $res_str .= "-----------------\n";
- }
-
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTREGEX--
-locale='uk-ua_CALIFORNIA@currency=;currency=GRN'
-disp_locale=en : display_variant=CALIFORNIA
-disp_locale=fr : display_variant=CALIFORNIA
-disp_locale=de : display_variant=CALIFORNIA
------------------
-locale='root'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='uk@currency=EURO'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='Hindi'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='de'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='fr'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='ja'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='i-enochian'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='zh-Hant'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='zh-Hans'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sr-Cyrl'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sr-Latn'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='zh-Hans-CN'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sr-Latn-CS'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sl-rozaj'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sl-nedis'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='de-CH-1901'
-disp_locale=en : display_variant=Traditional German orthography
-disp_locale=fr : display_variant=orthographe allemande traditionnelle
-disp_locale=de : display_variant=(1901|[Aa]lte deutsche Rechtschreibung)
------------------
-locale='sl-IT-nedis'
-disp_locale=en : display_variant=Natisone dialect
-disp_locale=fr : display_variant=dialecte de Natisone
-disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt)
------------------
-locale='sl-Latn-IT-nedis'
-disp_locale=en : display_variant=Natisone dialect
-disp_locale=fr : display_variant=dialecte de Natisone
-disp_locale=de : display_variant=(NEDIS|Natisone-Dialekt)
------------------
-locale='de-DE'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='en-US'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='es-419'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='de-CH-x-phonebk'
-disp_locale=en : display_variant=X_PHONEBK
-disp_locale=fr : display_variant=X_PHONEBK
-disp_locale=de : display_variant=X_PHONEBK
------------------
-locale='az-Arab-x-AZE-derbend'
-disp_locale=en : display_variant=(AZE_DERBEND)?
-disp_locale=fr : display_variant=(AZE_DERBEND)?
-disp_locale=de : display_variant=(AZE_DERBEND)?
------------------
-locale='zh-min'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='zh-min-nan-Hant-CN'
-disp_locale=en : display_variant=NAN_HANT_CN
-disp_locale=fr : display_variant=NAN_HANT_CN
-disp_locale=de : display_variant=NAN_HANT_CN
------------------
-locale='x-whatever'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='qaa-Qaaa-QM-x-southern'
-disp_locale=en : display_variant=X_SOUTHERN
-disp_locale=fr : display_variant=X_SOUTHERN
-disp_locale=de : display_variant=X_SOUTHERN
------------------
-locale='sr-Latn-QM'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='sr-Qaaa-CS'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='en-US-u-islamCal'
-disp_locale=en : display_variant=U_ISLAMCAL
-disp_locale=fr : display_variant=U_ISLAMCAL
-disp_locale=de : display_variant=U_ISLAMCAL
------------------
-locale='zh-CN-a-myExt-x-private'
-disp_locale=en : display_variant=A_MYEXT_X_PRIVATE
-disp_locale=fr : display_variant=A_MYEXT_X_PRIVATE
-disp_locale=de : display_variant=A_MYEXT_X_PRIVATE
------------------
-locale='en-a-myExt-b-another'
-disp_locale=en : display_variant=(MYEXT_B_ANOTHER)?
-disp_locale=fr : display_variant=(MYEXT_B_ANOTHER)?
-disp_locale=de : display_variant=(MYEXT_B_ANOTHER)?
------------------
-locale='de-419-DE'
-disp_locale=en : display_variant=DE
-disp_locale=fr : display_variant=DE
-disp_locale=de : display_variant=DE
------------------
-locale='a-DE'
-disp_locale=en : display_variant=
-disp_locale=fr : display_variant=
-disp_locale=de : display_variant=
------------------
-locale='ar-a-aaa-b-bbb-a-ccc'
-disp_locale=en : display_variant=(AAA_B_BBB_A_CCC)?
-disp_locale=fr : display_variant=(AAA_B_BBB_A_CCC)?
-disp_locale=de : display_variant=(AAA_B_BBB_A_CCC)?
------------------
diff --git a/ext/intl/tests/locale_get_display_variant2.phpt b/ext/intl/tests/locale_get_display_variant2.phpt
index 2517240e30..88a623a666 100644
--- a/ext/intl/tests/locale_get_display_variant2.phpt
+++ b/ext/intl/tests/locale_get_display_variant2.phpt
@@ -1,8 +1,7 @@
--TEST--
locale_get_display_variant() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_get_keywords.phpt b/ext/intl/tests/locale_get_keywords.phpt
deleted file mode 100644
index 622dd79dc8..0000000000
--- a/ext/intl/tests/locale_get_keywords.phpt
+++ /dev/null
@@ -1,140 +0,0 @@
---TEST--
-locale_get_keywords() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try getting the keywords for different locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $locales = array(
- "de_DE@currency=EUR;collation=PHONEBOOK",
- 'uk-ua_CALIFORNIA@currency=GRN'
- );
-
- $locales = array(
- 'de_DE@currency=EUR;collation=PHONEBOOK',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'x-whatever',
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $keywords_arr = ut_loc_get_keywords( $locale);
- $res_str .= "$locale: ";
- if( $keywords_arr){
- foreach( $keywords_arr as $key => $value){
- $res_str .= "Key is $key and Value is $value \n";
- }
- }
- else{
- $res_str .= "No keywords found.";
- }
- $res_str .= "\n";
- }
-
- $res_str .= "\n";
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECT--
-de_DE@currency=EUR;collation=PHONEBOOK: Key is collation and Value is PHONEBOOK
-Key is currency and Value is EUR
-
-root: No keywords found.
-uk@currency=EURO: Key is currency and Value is EURO
-
-Hindi: No keywords found.
-de: No keywords found.
-fr: No keywords found.
-ja: No keywords found.
-i-enochian: No keywords found.
-zh-Hant: No keywords found.
-zh-Hans: No keywords found.
-sr-Cyrl: No keywords found.
-sr-Latn: No keywords found.
-zh-Hans-CN: No keywords found.
-sr-Latn-CS: No keywords found.
-sl-rozaj: No keywords found.
-sl-nedis: No keywords found.
-de-CH-1901: No keywords found.
-sl-IT-nedis: No keywords found.
-sl-Latn-IT-nedis: No keywords found.
-de-DE: No keywords found.
-en-US: No keywords found.
-es-419: No keywords found.
-de-CH-x-phonebk: No keywords found.
-az-Arab-x-AZE-derbend: No keywords found.
-zh-min: No keywords found.
-zh-min-nan-Hant-CN: No keywords found.
-x-whatever: No keywords found.
-qaa-Qaaa-QM-x-southern: No keywords found.
-sr-Latn-QM: No keywords found.
-sr-Qaaa-CS: No keywords found.
-en-US-u-islamCal: No keywords found.
-zh-CN-a-myExt-x-private: No keywords found.
-en-a-myExt-b-another: No keywords found.
-de-419-DE: No keywords found.
-a-DE: No keywords found.
-ar-a-aaa-b-bbb-a-ccc: No keywords found.
diff --git a/ext/intl/tests/locale_get_keywords2.phpt b/ext/intl/tests/locale_get_keywords2.phpt
index c36655f7b2..23a099b4ed 100644
--- a/ext/intl/tests/locale_get_keywords2.phpt
+++ b/ext/intl/tests/locale_get_keywords2.phpt
@@ -1,8 +1,7 @@
--TEST--
locale_get_keywords() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/locale_parse_locale.phpt b/ext/intl/tests/locale_parse_locale.phpt
deleted file mode 100644
index c8aa2f4123..0000000000
--- a/ext/intl/tests/locale_parse_locale.phpt
+++ /dev/null
@@ -1,203 +0,0 @@
---TEST--
-locale_parse_locale() icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-/*
- * Try parsing different Locales
- * with Procedural and Object methods.
- */
-
-function ut_main()
-{
- $res_str = '';
-
- $locales = array(
- 'uk-ua_CALIFORNIA@currency=;currency=GRN',
- 'root',
- 'uk@currency=EURO',
- 'Hindi',
-//Simple language subtag
- 'de',
- 'fr',
- 'ja',
- 'i-enochian', //(example of a grandfathered tag)
-//Language subtag plus Script subtag:
- 'zh-Hant',
- 'zh-Hans',
- 'sr-Cyrl',
- 'sr-Latn',
-//Language-Script-Region
- 'zh-Hans-CN',
- 'sr-Latn-CS',
-//Language-Variant
- 'sl-rozaj',
- 'sl-nedis',
-//Language-Region-Variant
- 'de-CH-1901',
- 'sl-IT-nedis',
-//Language-Script-Region-Variant
- 'sl-Latn-IT-nedis',
-//Language-Region:
- 'de-DE',
- 'en-US',
- 'es-419',
-//Private use subtags:
- 'de-CH-x-phonebk',
- 'az-Arab-x-AZE-derbend',
-//Extended language subtags
- 'zh-min',
- 'zh-min-nan-Hant-CN',
-//Private use registry values
- 'qaa-Qaaa-QM-x-southern',
- 'sr-Latn-QM',
- 'sr-Qaaa-CS',
-/*Tags that use extensions (examples ONLY: extensions MUST be defined
- by revision or update to this document or by RFC): */
- 'en-US-u-islamCal',
- 'zh-CN-a-myExt-x-private',
- 'en-a-myExt-b-another',
-//Some Invalid Tags:
- 'de-419-DE',
- 'a-DE',
- 'ar-a-aaa-b-bbb-a-ccc'
- );
-
-
- $res_str = '';
-
- foreach( $locales as $locale )
- {
- $arr = ut_loc_locale_parse( $locale);
- $res_str .= "---------------------\n";
- $res_str .= "$locale:\n";
- if( $arr){
- foreach( $arr as $key => $value){
- $res_str .= "$key : '$value' , ";
- }
- $res_str = rtrim($res_str);
- }
- else{
- $res_str .= "No values found from Locale parsing.";
- }
- $res_str .= "\n";
- }
-
- $res_str .= "\n";
- return $res_str;
-
-}
-
-include_once( 'ut_common.inc' );
-ut_run();
-
-?>
---EXPECTF--
----------------------
-uk-ua_CALIFORNIA@currency=;currency=GRN:
-language : 'uk' , region : 'UA' , variant0 : 'CALIFORNIA' ,
----------------------
-root:
-language : 'root' ,
----------------------
-uk@currency=EURO:
-language : 'uk' ,
----------------------
-Hindi:
-language : 'hindi' ,
----------------------
-de:
-language : 'de' ,
----------------------
-fr:
-language : 'fr' ,
----------------------
-ja:
-language : 'ja' ,
----------------------
-i-enochian:
-grandfathered : 'i-enochian' ,
----------------------
-zh-Hant:
-language : 'zh' , script : 'Hant' ,
----------------------
-zh-Hans:
-language : 'zh' , script : 'Hans' ,
----------------------
-sr-Cyrl:
-language : 'sr' , script : 'Cyrl' ,
----------------------
-sr-Latn:
-language : 'sr' , script : 'Latn' ,
----------------------
-zh-Hans-CN:
-language : 'zh' , script : 'Hans' , region : 'CN' ,
----------------------
-sr-Latn-CS:
-language : 'sr' , script : 'Latn' , region : 'CS' ,
----------------------
-sl-rozaj:
-language : 'sl' ,%r( region : 'ROZAJ' ,)?%r
----------------------
-sl-nedis:
-language : 'sl' ,%r( region : 'NEDIS' ,)?%r
----------------------
-de-CH-1901:
-language : 'de' , region : 'CH' , variant0 : '1901' ,
----------------------
-sl-IT-nedis:
-language : 'sl' , region : 'IT' , variant0 : 'NEDIS' ,
----------------------
-sl-Latn-IT-nedis:
-language : 'sl' , script : 'Latn' , region : 'IT' , variant0 : 'NEDIS' ,
----------------------
-de-DE:
-language : 'de' , region : 'DE' ,
----------------------
-en-US:
-language : 'en' , region : 'US' ,
----------------------
-es-419:
-language : 'es' , region : '419' ,
----------------------
-de-CH-x-phonebk:
-language : 'de' , region : 'CH' , private0 : 'phonebk' ,
----------------------
-az-Arab-x-AZE-derbend:
-language : 'az' , script : 'Arab' , private0 : 'AZE' , private1 : 'derbend' ,
----------------------
-zh-min:
-grandfathered : 'zh-min' ,
----------------------
-zh-min-nan-Hant-CN:
-language : 'zh' , region : 'MIN' , variant0 : 'NAN' , variant1 : 'HANT' , variant2 : 'CN' ,
----------------------
-qaa-Qaaa-QM-x-southern:
-language : 'qaa' , script : 'Qaaa' , region : 'QM' , private0 : 'southern' ,
----------------------
-sr-Latn-QM:
-language : 'sr' , script : 'Latn' , region : 'QM' ,
----------------------
-sr-Qaaa-CS:
-language : 'sr' , script : 'Qaaa' , region : 'CS' ,
----------------------
-en-US-u-islamCal:
-language : 'en' , region : 'US' ,
----------------------
-zh-CN-a-myExt-x-private:
-language : 'zh' , region : 'CN' , private0 : 'private' ,
----------------------
-en-a-myExt-b-another:
-language : 'en' ,
----------------------
-de-419-DE:
-language : 'de' , region : '419' , variant0 : 'DE' ,
----------------------
-a-DE:
-No values found from Locale parsing.
----------------------
-ar-a-aaa-b-bbb-a-ccc:
-language : 'ar' ,
diff --git a/ext/intl/tests/locale_parse_locale2.phpt b/ext/intl/tests/locale_parse_locale2.phpt
index f1482730c3..fbda757ed5 100644
--- a/ext/intl/tests/locale_parse_locale2.phpt
+++ b/ext/intl/tests/locale_parse_locale2.phpt
@@ -1,8 +1,7 @@
--TEST--
locale_parse_locale() icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_bug70484.phpt b/ext/intl/tests/msgfmt_bug70484.phpt
index 1240498264..55c516eacd 100644
--- a/ext/intl/tests/msgfmt_bug70484.phpt
+++ b/ext/intl/tests/msgfmt_bug70484.phpt
@@ -4,8 +4,6 @@ Bug #70484 selectordinal doesn't work with named parameters
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '5.0') < 0)
- die('skip for ICU 5.0+');
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_fail.phpt b/ext/intl/tests/msgfmt_fail.phpt
deleted file mode 100644
index afb415d1c8..0000000000
--- a/ext/intl/tests/msgfmt_fail.phpt
+++ /dev/null
@@ -1,132 +0,0 @@
---TEST--
-msgfmt creation failures icu <= 4.2
---SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
---FILE--
-<?php
-
-function err($fmt) {
- if(!$fmt) {
- echo var_export(intl_get_error_message(), true)."\n";
- }
-}
-
-function print_exception($e) {
- echo "\n" . get_class($e) . ": " . $e->getMessage()
- . " in " . $e->getFile() . " on line " . $e->getLine() . "\n";
-}
-
-function crt($t, $l, $s) {
- switch(true) {
- case $t == "O":
- try {
- return new MessageFormatter($l, $s);
- } catch (Throwable $e) {
- print_exception($e);
- return null;
- }
- break;
- case $t == "C":
- return MessageFormatter::create($l, $s);
- break;
- case $t == "P":
- return msgfmt_create($l, $s);
- break;
- }
-}
-
-$args = array(
- array(null, null),
- array("whatever", "{0,whatever}"),
- array(array(), array()),
- array("en", "{0,choice}"),
- array("fr", "{0,"),
- array("en_US", "\xD0"),
-);
-
-try {
- $fmt = new MessageFormatter();
-} catch (TypeError $e) {
- print_exception($e);
- $fmt = null;
-}
-err($fmt);
-$fmt = msgfmt_create();
-err($fmt);
-$fmt = MessageFormatter::create();
-err($fmt);
-try {
- $fmt = new MessageFormatter('en');
-} catch (TypeError $e) {
- print_exception($e);
- $fmt = null;
-}
-err($fmt);
-$fmt = msgfmt_create('en');
-err($fmt);
-$fmt = MessageFormatter::create('en');
-err($fmt);
-
-foreach($args as $arg) {
- $fmt = crt("O", $arg[0], $arg[1]);
- err($fmt);
- $fmt = crt("C", $arg[0], $arg[1]);
- err($fmt);
- $fmt = crt("P", $arg[0], $arg[1]);
- err($fmt);
-}
-
-?>
---EXPECTF--
-TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: msgfmt_create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: MessageFormatter::create() expects exactly 2 parameters, 0 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-TypeError: MessageFormatter::__construct() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: msgfmt_create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: MessageFormatter::create() expects exactly 2 parameters, 1 given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-
-TypeError: MessageFormatter::__construct() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: MessageFormatter::create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-Warning: msgfmt_create() expects parameter 1 to be string, array given in %s on line %d
-'msgfmt_create: unable to parse input parameters: U_ILLEGAL_ARGUMENT_ERROR'
-
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-'msgfmt_create: message formatter creation failed: U_ILLEGAL_ARGUMENT_ERROR'
-
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
-'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
-'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
-'msgfmt_create: message formatter creation failed: U_UNMATCHED_BRACES'
-
-IntlException: Constructor failed in %smsgfmt_fail2.php on line %d
-'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
-'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
-'msgfmt_create: error converting pattern to UTF-16: U_INVALID_CHAR_FOUND'
diff --git a/ext/intl/tests/msgfmt_fail2.phpt b/ext/intl/tests/msgfmt_fail2.phpt
index d574531b3a..0016de4bb7 100644
--- a/ext/intl/tests/msgfmt_fail2.phpt
+++ b/ext/intl/tests/msgfmt_fail2.phpt
@@ -1,8 +1,7 @@
--TEST--
msgfmt creation failures icu >= 4.8
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_format_error2.phpt b/ext/intl/tests/msgfmt_format_error2.phpt
index 4c6ef44838..69ab9f37ca 100644
--- a/ext/intl/tests/msgfmt_format_error2.phpt
+++ b/ext/intl/tests/msgfmt_format_error2.phpt
@@ -4,8 +4,6 @@ MessageFormatter::format() inconsistent types in named argument
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_error3.phpt b/ext/intl/tests/msgfmt_format_error3.phpt
index b55feabc13..5cbe9a121b 100644
--- a/ext/intl/tests/msgfmt_format_error3.phpt
+++ b/ext/intl/tests/msgfmt_format_error3.phpt
@@ -4,8 +4,6 @@ MessageFormatter::format() given negative arg key
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_error4.phpt b/ext/intl/tests/msgfmt_format_error4.phpt
index 78252d2d21..96b1f39b0b 100644
--- a/ext/intl/tests/msgfmt_format_error4.phpt
+++ b/ext/intl/tests/msgfmt_format_error4.phpt
@@ -4,8 +4,6 @@ MessageFormatter::format() invalid UTF-8 for arg key or value
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_error5.phpt b/ext/intl/tests/msgfmt_format_error5.phpt
index 5c0f3351c2..c828b43abb 100644
--- a/ext/intl/tests/msgfmt_format_error5.phpt
+++ b/ext/intl/tests/msgfmt_format_error5.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_error6.phpt b/ext/intl/tests/msgfmt_format_error6.phpt
index 94f0b3a939..8a6998a35b 100644
--- a/ext/intl/tests/msgfmt_format_error6.phpt
+++ b/ext/intl/tests/msgfmt_format_error6.phpt
@@ -4,8 +4,6 @@ MessageFormatter::format() invalid type for key not in pattern
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_mixed_params.phpt b/ext/intl/tests/msgfmt_format_mixed_params.phpt
index 2382d0b407..36ccf0b147 100644
--- a/ext/intl/tests/msgfmt_format_mixed_params.phpt
+++ b/ext/intl/tests/msgfmt_format_mixed_params.phpt
@@ -4,8 +4,6 @@ MessageFormatter::format(): mixed named and numeric parameters
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt
index a300d13b77..34d45776b6 100644
--- a/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt
+++ b/ext/intl/tests/msgfmt_format_simple_types_numeric_strings.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/msgfmt_format_subpatterns.phpt b/ext/intl/tests/msgfmt_format_subpatterns.phpt
index 9f11e3e255..c18bb4be88 100644
--- a/ext/intl/tests/msgfmt_format_subpatterns.phpt
+++ b/ext/intl/tests/msgfmt_format_subpatterns.phpt
@@ -4,8 +4,6 @@ msgfmt_format() with subpatterns
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
diff --git a/ext/intl/tests/msgfmt_format_subpatterns_named.phpt b/ext/intl/tests/msgfmt_format_subpatterns_named.phpt
index f6af02561b..249f73ce2c 100644
--- a/ext/intl/tests/msgfmt_format_subpatterns_named.phpt
+++ b/ext/intl/tests/msgfmt_format_subpatterns_named.phpt
@@ -4,8 +4,6 @@ msgfmt_format() with named subpatterns
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
diff --git a/ext/intl/tests/normalizer_get_raw_decomposition.phpt b/ext/intl/tests/normalizer_get_raw_decomposition.phpt
index bffc8fedeb..63caa7d472 100644
--- a/ext/intl/tests/normalizer_get_raw_decomposition.phpt
+++ b/ext/intl/tests/normalizer_get_raw_decomposition.phpt
@@ -1,8 +1,8 @@
--TEST--
normalizer_get_raw_decomposition()
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
-<?php if( !function_exists( 'normalizer_get_raw_decomposition' ) ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' ) ) print 'skip intl extension not loaded'; ?>
+<?php if( !function_exists( 'normalizer_get_raw_decomposition' ) ) print 'skip normalizer_get_raw_decomposition function does not exist'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/normalizer_normalize_kc_cf.phpt b/ext/intl/tests/normalizer_normalize_kc_cf.phpt
index 6ce0658772..246e41baa2 100644
--- a/ext/intl/tests/normalizer_normalize_kc_cf.phpt
+++ b/ext/intl/tests/normalizer_normalize_kc_cf.phpt
@@ -1,8 +1,8 @@
--TEST--
normalize() NFKC_Casefold
--SKIPIF--
-<?php if (!extension_loaded('intl')) print 'skip'; ?>
-<?php if (!defined('Normalizer::FORM_KC_CF')) print 'skip'; ?>
+<?php if (!extension_loaded('intl')) print 'skip intl extension not loaded'; ?>
+<?php if (!defined('Normalizer::FORM_KC_CF')) print 'skip Normalizer::FORM_KC_CF constant not defined'; ?>
--FILE--
<?php
diff --git a/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt b/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt
index 95ea311088..4a8c68a8de 100644
--- a/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt
+++ b/ext/intl/tests/rbbiter_getBinaryRules_basic.phpt
@@ -3,7 +3,6 @@ IntlRuleBasedBreakIterator::getBinaryRules(): basic test
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if (version_compare(INTL_ICU_VERSION, '61.1') >= 0) die('skip for ICU < 61.1'); ?>
-<?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip ICU >= 4.8 only'; ?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/resourcebundle_internal.phpt b/ext/intl/tests/resourcebundle_internal.phpt
index 2063ae2277..6f301a0c5f 100644
--- a/ext/intl/tests/resourcebundle_internal.phpt
+++ b/ext/intl/tests/resourcebundle_internal.phpt
@@ -1,7 +1,9 @@
--TEST--
Test ResourceBundle::__construct() with internal ICU bundles
--SKIPIF--
-<?php if( !extension_loaded( 'intl' ) || !defined('INTL_ICU_DATA_VERSION') || version_compare(INTL_ICU_DATA_VERSION, '4.4', '<') ) print 'skip'; ?>
+<?php if( !extension_loaded( 'intl' )) print 'skip intl extension not loaded'; ?>
+<?php if( !defined('INTL_ICU_DATA_VERSION')) print 'skip INTL_ICU_DATA_VERSION constant not defined'; ?>
+<?php if( version_compare(INTL_ICU_DATA_VERSION, '4.4', '<')) print 'skip for ICU >= 4.4'; ?>
--FILE--
<?php
$b = new ResourceBundle('de_DE', 'ICUDATA-region');
diff --git a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
index 2eb8a240dd..ae6effef6e 100644
--- a/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
+++ b/ext/intl/tests/resourcebundle_null_mandatory_args.phpt
@@ -4,7 +4,6 @@ ResourceBundle constructor bundle accepts NULL for first two arguments
date.timezone=Atlantic/Azores
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
-<?php if (version_compare(INTL_ICU_VERSION, '4.8') < 0) die('skip ICU >= 4.8 only'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt
index 9ceffc5289..4bcc12f26c 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_basic.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::createTimeZoneIDEnumeration(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -31,4 +29,4 @@ Array
(
[0] => Atlantic/Azores
)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
index 601760a3a3..5edfaeaf6b 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_error.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::createTimeZoneIDEnumeration(): errors
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt
index d57dfbf42f..05fc404442 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant1.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::createTimeZoneIDEnumeration(): variant without offset
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -29,4 +27,4 @@ var_dump($values2 == $values);
bool(true)
bool(true)
bool(true)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt
index 2afe171c58..a21b9a703d 100644
--- a/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt
+++ b/ext/intl/tests/timezone_createTimeZoneIDEnumeration_variant2.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::createTimeZoneIDEnumeration(): variant without region
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -49,4 +47,4 @@ Array
[0] => Atlantic/Azores
[1] => Etc/GMT+1
)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/timezone_createTimeZone_basic.phpt b/ext/intl/tests/timezone_createTimeZone_basic.phpt
index e79f5b58ee..88b83150d9 100644
--- a/ext/intl/tests/timezone_createTimeZone_basic.phpt
+++ b/ext/intl/tests/timezone_createTimeZone_basic.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::createTimeZone(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -30,4 +28,4 @@ IntlTimeZone Object
[rawOffset] => 3600000
[currentOffset] => 3600000
)
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
index 706d8824ba..353b4ec8d6 100644
--- a/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_variant2-49+.phpt
@@ -2,7 +2,6 @@
IntlTimeZone::getDisplayName(): type parameter (ICU >= 49 && ICU < 50.1.2)
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
-<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU 49+'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '50.1.2') >= 0) die('skip for ICU < 50.1.2'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/timezone_getDisplayName_variant2.phpt b/ext/intl/tests/timezone_getDisplayName_variant2.phpt
deleted file mode 100644
index 1ccf68767f..0000000000
--- a/ext/intl/tests/timezone_getDisplayName_variant2.phpt
+++ /dev/null
@@ -1,40 +0,0 @@
---TEST--
-IntlTimeZone::getDisplayName(): type parameter (ICU < 49)
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') >= 0)
- die('skip for ICU < 49');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("error_reporting", -1);
-ini_set("display_errors", 1);
-
-$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
-
-ini_set('intl.default_locale', 'en_US');
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GENERIC));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GENERIC));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_GMT));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG_GMT));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_SHORT_COMMONLY_USED));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_GENERIC_LOCATION));
-
-?>
-==DONE==
---EXPECT--
-string(3) "WET"
-string(21) "Western European Time"
-string(22) "Portugal Time (Lisbon)"
-string(22) "Portugal Time (Lisbon)"
-string(5) "+0000"
-string(3) "GMT"
-string(3) "GMT"
-string(22) "Portugal Time (Lisbon)"
-==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt b/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt
index 6aec1df8a8..74e6ed9b4d 100644
--- a/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt
+++ b/ext/intl/tests/timezone_getDisplayName_variant3-49+.phpt
@@ -2,7 +2,6 @@
IntlTimeZone::getDisplayName(): locale parameter
--SKIPIF--
<?php if (!extension_loaded('intl')) die('skip intl extension not enabled'); ?>
-<?php if (version_compare(INTL_ICU_VERSION, '49') < 0) die('skip for ICU >= 49'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '55.1') >= 0) die('skip for ICU < 55.1'); ?>
--FILE--
<?php
diff --git a/ext/intl/tests/timezone_getDisplayName_variant3.phpt b/ext/intl/tests/timezone_getDisplayName_variant3.phpt
deleted file mode 100644
index c160777583..0000000000
--- a/ext/intl/tests/timezone_getDisplayName_variant3.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-IntlTimeZone::getDisplayName(): locale parameter
---SKIPIF--
-<?php
-if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') >= 0)
- die('skip for ICU <= 4.8');
---FILE--
-<?php
-ini_set("intl.error_level", E_WARNING);
-ini_set("error_reporting", -1);
-ini_set("display_errors", 1);
-
-$lsb = IntlTimeZone::createTimeZone('Europe/Lisbon');
-
-ini_set('intl.default_locale', 'en_US');
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, NULL));
-var_dump($lsb->getDisplayName(false, IntlTimeZone::DISPLAY_LONG, 'pt_PT'));
-
-?>
-==DONE==
---EXPECT--
-string(21) "Western European Time"
-string(21) "Western European Time"
-string(24) "Hora da Europa Ocidental"
-==DONE== \ No newline at end of file
diff --git a/ext/intl/tests/timezone_getRegion_basic.phpt b/ext/intl/tests/timezone_getRegion_basic.phpt
index 1a41ae8d58..3d020e77a3 100644
--- a/ext/intl/tests/timezone_getRegion_basic.phpt
+++ b/ext/intl/tests/timezone_getRegion_basic.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::getRegion(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
@@ -18,4 +16,4 @@ echo "\n";
--EXPECT--
NL
NL
-==DONE== \ No newline at end of file
+==DONE==
diff --git a/ext/intl/tests/timezone_getRegion_error.phpt b/ext/intl/tests/timezone_getRegion_error.phpt
index 4661c4cbc4..7a9e1e1ca7 100644
--- a/ext/intl/tests/timezone_getRegion_error.phpt
+++ b/ext/intl/tests/timezone_getRegion_error.phpt
@@ -4,8 +4,6 @@ IntlTimeZone::getRegion(): errors
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
- die('skip for ICU 4.8+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/timezone_getUnknown_basic.phpt b/ext/intl/tests/timezone_getUnknown_basic.phpt
index 2451ce40f3..7d5f50206a 100644
--- a/ext/intl/tests/timezone_getUnknown_basic.phpt
+++ b/ext/intl/tests/timezone_getUnknown_basic.phpt
@@ -4,8 +4,6 @@ IntlCalendar::getUnknown(): basic test
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/timezone_getUnknown_error.phpt b/ext/intl/tests/timezone_getUnknown_error.phpt
index 5df5c69b1f..57773c256b 100644
--- a/ext/intl/tests/timezone_getUnknown_error.phpt
+++ b/ext/intl/tests/timezone_getUnknown_error.phpt
@@ -6,8 +6,6 @@ date.timezone=Atlantic/Azores
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
-if (version_compare(INTL_ICU_VERSION, '49') < 0)
- die('skip for ICU 49+');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
diff --git a/ext/intl/tests/uconverter_getDestinationEncoding.phpt b/ext/intl/tests/uconverter_getDestinationEncoding.phpt
new file mode 100644
index 0000000000..0bfe25d2e3
--- /dev/null
+++ b/ext/intl/tests/uconverter_getDestinationEncoding.phpt
@@ -0,0 +1,14 @@
+--TEST--
+UConverter::getDestinationEncoding()
+--CREDITS--
+Andy McNeice - PHP Testfest 2017
+--INI--
+intl.error_level = E_WARNING
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+$c = new UConverter('UTF-7', 'ascii');
+var_dump($c->getDestinationEncoding());
+--EXPECT--
+string(5) "UTF-7"
diff --git a/ext/intl/tests/uconverter_getSourceEncoding.phpt b/ext/intl/tests/uconverter_getSourceEncoding.phpt
new file mode 100644
index 0000000000..c544e8e9b2
--- /dev/null
+++ b/ext/intl/tests/uconverter_getSourceEncoding.phpt
@@ -0,0 +1,14 @@
+--TEST--
+UConverter::getSourceEncoding()
+--CREDITS--
+Andy McNeice - PHP Testfest 2017
+--INI--
+intl.error_level = E_WARNING
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+$c = new UConverter('utf-32', 'ascii');
+var_dump($c->getSourceEncoding());
+--EXPECT--
+string(8) "US-ASCII"
diff --git a/ext/intl/tests/uconverter_setSourceEncoding.phpt b/ext/intl/tests/uconverter_setSourceEncoding.phpt
new file mode 100644
index 0000000000..69d8d346ab
--- /dev/null
+++ b/ext/intl/tests/uconverter_setSourceEncoding.phpt
@@ -0,0 +1,17 @@
+--TEST--
+UConverter::setSourceEncoding()
+--CREDITS--
+Andy McNeice - PHP Testfest 2017
+--INI--
+intl.error_level = E_WARNING
+--SKIPIF--
+<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
+--FILE--
+<?php
+$c = new UConverter('latin1', 'ascii');
+var_dump($c->getSourceEncoding());
+$c->setSourceEncoding('utf-7');
+var_dump($c->getSourceEncoding());
+--EXPECT--
+string(8) "US-ASCII"
+string(5) "UTF-7"
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index 1f20ea9b52..aabb0f3f55 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -462,18 +462,12 @@ static const zend_function_entry TimeZone_class_functions[] = {
PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME_MAPPING(createDefault, intltz_create_default, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME_MAPPING(getGMT, intltz_get_gmt, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#if U_ICU_VERSION_MAJOR_NUM >= 49
PHP_ME_MAPPING(getUnknown, intltz_get_unknown, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#endif
PHP_ME_MAPPING(createEnumeration, intltz_create_enumeration, ainfo_tz_createEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME_MAPPING(countEquivalentIDs, intltz_count_equivalent_ids, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_ME_MAPPING(createTimeZoneIDEnumeration, intltz_create_time_zone_id_enumeration, ainfo_tz_createTimeZoneIDEnumeration, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#endif
PHP_ME_MAPPING(getCanonicalID, intltz_get_canonical_id, ainfo_tz_getCanonicalID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
PHP_ME_MAPPING(getRegion, intltz_get_region, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-#endif
PHP_ME_MAPPING(getTZDataVersion, intltz_get_tz_data_version, ainfo_tz_void, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME_MAPPING(getEquivalentID, intltz_get_equivalent_id, ainfo_tz_getEquivalentID, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
@@ -531,20 +525,16 @@ U_CFUNC void timezone_register_IntlTimeZone_class(void)
TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT", TimeZone::SHORT);
TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG", TimeZone::LONG);
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_GENERIC", TimeZone::SHORT_GENERIC);
TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG_GENERIC", TimeZone::LONG_GENERIC);
TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_GMT", TimeZone::SHORT_GMT);
TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG_GMT", TimeZone::LONG_GMT);
TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT_COMMONLY_USED", TimeZone::SHORT_COMMONLY_USED);
TIMEZONE_DECL_LONG_CONST("DISPLAY_GENERIC_LOCATION", TimeZone::GENERIC_LOCATION);
-#endif
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
TIMEZONE_DECL_LONG_CONST("TYPE_ANY", UCAL_ZONE_TYPE_ANY);
TIMEZONE_DECL_LONG_CONST("TYPE_CANONICAL", UCAL_ZONE_TYPE_CANONICAL);
TIMEZONE_DECL_LONG_CONST("TYPE_CANONICAL_LOCATION", UCAL_ZONE_TYPE_CANONICAL_LOCATION);
-#endif
/* Declare 'IntlTimeZone' class properties */
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 9dd2f60939..3f91db3130 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -131,7 +131,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_gmt)
timezone_object_construct(TimeZone::getGMT(), return_value, 0);
}
-#if U_ICU_VERSION_MAJOR_NUM >= 49
U_CFUNC PHP_FUNCTION(intltz_get_unknown)
{
intl_error_reset(NULL);
@@ -144,7 +143,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_unknown)
timezone_object_construct(&TimeZone::getUnknown(), return_value, 0);
}
-#endif
U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
{
@@ -232,7 +230,6 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
RETURN_LONG((zend_long)result);
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
{
zend_long zoneType,
@@ -278,7 +275,6 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
IntlIterator_from_StringEnumeration(se, return_value);
}
-#endif
U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
{
@@ -319,7 +315,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
}
}
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 48
U_CFUNC PHP_FUNCTION(intltz_get_region)
{
char *str_id;
@@ -347,7 +342,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
RETURN_STRINGL(outbuf, region_len);
}
-#endif
U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
{
@@ -515,11 +509,9 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
static const TimeZone::EDisplayType display_types[] = {
TimeZone::SHORT, TimeZone::LONG,
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
TimeZone::SHORT_GENERIC, TimeZone::LONG_GENERIC,
TimeZone::SHORT_GMT, TimeZone::LONG_GMT,
TimeZone::SHORT_COMMONLY_USED, TimeZone::GENERIC_LOCATION
-#endif
};
U_CFUNC PHP_FUNCTION(intltz_get_display_name)
diff --git a/ext/intl/transliterator/transliterator.c b/ext/intl/transliterator/transliterator.c
index e7f2ffd72c..a80de4bf9a 100644
--- a/ext/intl/transliterator/transliterator.c
+++ b/ext/intl/transliterator/transliterator.c
@@ -48,12 +48,3 @@ void transliterator_register_constants( INIT_FUNC_ARGS )
#undef NORMALIZER_EXPOSE_CONST
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c
index 3c58b43324..a662dcee7d 100644
--- a/ext/intl/transliterator/transliterator_class.c
+++ b/ext/intl/transliterator/transliterator_class.c
@@ -255,8 +255,7 @@ static zval *Transliterator_read_property( zval *object, zval *member, int type,
/* }}} */
/* {{{ write_property handler */
-static void Transliterator_write_property( zval *object, zval *member, zval *value,
- void **cache_slot )
+static zval *Transliterator_write_property( zval *object, zval *member, zval *value, void **cache_slot )
{
zend_class_entry *scope;
TRANSLITERATOR_PROPERTY_HANDLER_PROLOG;
@@ -274,10 +273,12 @@ static void Transliterator_write_property( zval *object, zval *member, zval *val
}
else
{
- zend_std_write_property( object, member, value, cache_slot );
+ value = zend_std_write_property( object, member, value, cache_slot );
}
TRANSLITERATOR_PROPERTY_HANDLER_EPILOG;
+
+ return value;
}
/* }}} */
@@ -311,7 +312,7 @@ ZEND_END_ARG_INFO()
* Every 'Transliterator' class method has an entry in this table
*/
static const zend_function_entry Transliterator_class_functions[] = {
- PHP_ME( Transliterator, __construct, ainfo_trans_void, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR | ZEND_ACC_FINAL )
+ PHP_ME( Transliterator, __construct, ainfo_trans_void, ZEND_ACC_PRIVATE | ZEND_ACC_FINAL )
PHP_ME_MAPPING( create, transliterator_create, ainfo_trans_create, ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
PHP_ME_MAPPING( createFromRules,transliterator_create_from_rules, ainfo_trans_create_from_rules, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
PHP_ME_MAPPING( createInverse, transliterator_create_inverse, ainfo_trans_void, ZEND_ACC_PUBLIC )
@@ -358,12 +359,3 @@ void transliterator_register_Transliterator_class( void )
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/transliterator/transliterator_methods.c b/ext/intl/transliterator/transliterator_methods.c
index 8bf7f9e7f2..25d0b9a4da 100644
--- a/ext/intl/transliterator/transliterator_methods.c
+++ b/ext/intl/transliterator/transliterator_methods.c
@@ -525,13 +525,3 @@ PHP_FUNCTION( transliterator_get_error_message )
RETURN_STR( message );
}
/* }}} */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/ext/intl/uchar/ublockcode-enum.h b/ext/intl/uchar/ublockcode-enum.h
index aaed7f12ed..489a2da89a 100644
--- a/ext/intl/uchar/ublockcode-enum.h
+++ b/ext/intl/uchar/ublockcode-enum.h
@@ -173,7 +173,6 @@ UBLOCKCODE(CARIAN)
UBLOCKCODE(LYDIAN)
UBLOCKCODE(MAHJONG_TILES)
UBLOCKCODE(DOMINO_TILES)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
UBLOCKCODE(SAMARITAN)
UBLOCKCODE(UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED)
UBLOCKCODE(TAI_THAM)
@@ -200,8 +199,6 @@ UBLOCKCODE(EGYPTIAN_HIEROGLYPHS)
UBLOCKCODE(ENCLOSED_ALPHANUMERIC_SUPPLEMENT)
UBLOCKCODE(ENCLOSED_IDEOGRAPHIC_SUPPLEMENT)
UBLOCKCODE(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C)
-#endif /* ICU >= 4.4 */
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 46
UBLOCKCODE(MANDAIC)
UBLOCKCODE(BATAK)
UBLOCKCODE(ETHIOPIC_EXTENDED_A)
@@ -214,8 +211,6 @@ UBLOCKCODE(EMOTICONS)
UBLOCKCODE(TRANSPORT_AND_MAP_SYMBOLS)
UBLOCKCODE(ALCHEMICAL_SYMBOLS)
UBLOCKCODE(CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D)
-#endif /* ICU >= 49.0 */
-#if U_ICU_VERSION_MAJOR_NUM >= 49
UBLOCKCODE(ARABIC_EXTENDED_A)
UBLOCKCODE(ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS)
UBLOCKCODE(CHAKMA)
@@ -227,7 +222,6 @@ UBLOCKCODE(SHARADA)
UBLOCKCODE(SORA_SOMPENG)
UBLOCKCODE(SUNDANESE_SUPPLEMENT)
UBLOCKCODE(TAKRI)
-#endif /* ICU >= 49 */
#if U_ICU_VERSION_MAJOR_NUM >= 54
UBLOCKCODE(BASSA_VAH)
UBLOCKCODE(CAUCASIAN_ALBANIAN)
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c
index c4a1c76278..857b4d5d93 100644
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -3,9 +3,7 @@
#include "intl_convert.h"
#include <unicode/uchar.h>
-#if U_ICU_VERSION_MAJOR_NUM >= 49
#include <unicode/utf8.h>
-#endif
#define IC_METHOD(mname) PHP_METHOD(IntlChar, mname)
diff --git a/ext/intl/uchar/uother-enum.h b/ext/intl/uchar/uother-enum.h
index 5e59b6bd36..c45dfad6c7 100644
--- a/ext/intl/uchar/uother-enum.h
+++ b/ext/intl/uchar/uother-enum.h
@@ -19,9 +19,7 @@ UOTHER(EA_COUNT)
UOTHER(UNICODE_CHAR_NAME)
UOTHER(UNICODE_10_CHAR_NAME)
UOTHER(EXTENDED_CHAR_NAME)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
UOTHER(CHAR_NAME_ALIAS)
-#endif /* ICU >= 4.4 */
UOTHER(CHAR_NAME_CHOICE_COUNT)
/* UPropertyNameChoice - http://icu-project.org/apiref/icu4c/uchar_8h.html#a5056494c7d5a2c7185f3c464f48fe5d1 */
@@ -74,9 +72,7 @@ UOTHER(JG_FINAL_SEMKATH)
UOTHER(JG_GAF)
UOTHER(JG_GAMAL)
UOTHER(JG_HAH)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 46
UOTHER(JG_TEH_MARBUTA_GOAL)
-#endif /* ICU >= 4.6 */
UOTHER(JG_HAMZA_ON_HEH_GOAL)
UOTHER(JG_HE)
UOTHER(JG_HEH)
@@ -118,13 +114,9 @@ UOTHER(JG_FE)
UOTHER(JG_KHAPH)
UOTHER(JG_ZHAIN)
UOTHER(JG_BURUSHASKI_YEH_BARREE)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
UOTHER(JG_FARSI_YEH)
UOTHER(JG_NYA)
-#endif /* ICU >= 4.4 */
-#if U_ICU_VERSION_MAJOR_NUM >= 49
UOTHER(JG_ROHINGYA_YEH)
-#endif
#if U_ICU_VERSION_MAJOR_NUM >= 54
UOTHER(JG_MANICHAEAN_ALEPH)
UOTHER(JG_MANICHAEAN_AYIN)
@@ -170,9 +162,7 @@ UOTHER(GCB_T)
UOTHER(GCB_V)
UOTHER(GCB_SPACING_MARK)
UOTHER(GCB_PREPEND)
-#if U_ICU_VERSION_MAJOR_NUM >= 50
UOTHER(GCB_REGIONAL_INDICATOR)
-#endif /* ICU 50 */
UOTHER(GCB_COUNT)
/* UWordBreakValues - http://icu-project.org/apiref/icu4c/uchar_8h.html#af70ee907368e663f8dd4b90c7196e15c */
@@ -189,9 +179,7 @@ UOTHER(WB_EXTEND)
UOTHER(WB_LF)
UOTHER(WB_MIDNUMLET)
UOTHER(WB_NEWLINE)
-#if U_ICU_VERSION_MAJOR_NUM >= 50
UOTHER(WB_REGIONAL_INDICATOR)
-#endif /* ICU >= 50 */
#if U_ICU_VERSION_MAJOR_NUM >= 52
UOTHER(WB_HEBREW_LETTER)
UOTHER(WB_SINGLE_QUOTE)
@@ -255,16 +243,10 @@ UOTHER(LB_H3)
UOTHER(LB_JL)
UOTHER(LB_JT)
UOTHER(LB_JV)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
UOTHER(LB_CLOSE_PARENTHESIS)
-#endif /* ICU >= 4.4 */
-#if U_ICU_VERSION_MAJOR_NUM >= 49
UOTHER(LB_CONDITIONAL_JAPANESE_STARTER)
UOTHER(LB_HEBREW_LETTER)
-#endif /* ICU >= 49 */
-#if U_ICU_VERSION_MAJOR_NUM >= 50
UOTHER(LB_REGIONAL_INDICATOR)
-#endif /* ICU >= 50 */
UOTHER(LB_COUNT)
/* UNumericType - http://icu-project.org/apiref/icu4c/uchar_8h.html#adec3e7a6ae3a00274c019b3b2ddaecbe */
diff --git a/ext/intl/uchar/uproperty-enum.h b/ext/intl/uchar/uproperty-enum.h
index 3b7b80f365..59095a493e 100644
--- a/ext/intl/uchar/uproperty-enum.h
+++ b/ext/intl/uchar/uproperty-enum.h
@@ -49,7 +49,6 @@ UPROPERTY(POSIX_BLANK)
UPROPERTY(POSIX_GRAPH)
UPROPERTY(POSIX_PRINT)
UPROPERTY(POSIX_XDIGIT)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 44
UPROPERTY(CASED)
UPROPERTY(CASE_IGNORABLE)
UPROPERTY(CHANGES_WHEN_LOWERCASED)
@@ -58,7 +57,6 @@ UPROPERTY(CHANGES_WHEN_TITLECASED)
UPROPERTY(CHANGES_WHEN_CASEFOLDED)
UPROPERTY(CHANGES_WHEN_CASEMAPPED)
UPROPERTY(CHANGES_WHEN_NFKC_CASEFOLDED)
-#endif /* ICU >= 4.4 */
UPROPERTY(BINARY_LIMIT)
UPROPERTY(BIDI_CLASS)
UPROPERTY(INT_START)
@@ -110,9 +108,7 @@ UPROPERTY(UPPERCASE_MAPPING)
UPROPERTY(BIDI_PAIRED_BRACKET)
#endif /* ICU >= 52 */
UPROPERTY(STRING_LIMIT)
-#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 46
UPROPERTY(SCRIPT_EXTENSIONS)
UPROPERTY(OTHER_PROPERTY_START)
UPROPERTY(OTHER_PROPERTY_LIMIT)
-#endif /* ICU >= 4.6 */
UPROPERTY(INVALID_CODE)