diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 2fbf285f1852b..44d3265ddcdd0 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -25,7 +25,6 @@ #include "ext/standard/info.h" #include "main/php_output.h" #include "SAPI.h" -#include "php_ini.h" #include #include @@ -56,9 +55,6 @@ #define _php_iconv_memequal(a, b, c) \ (memcmp(a, b, c) == 0) -ZEND_DECLARE_MODULE_GLOBALS(iconv) -static PHP_GINIT_FUNCTION(iconv); - /* {{{ iconv_module_entry */ zend_module_entry iconv_module_entry = { STANDARD_MODULE_HEADER, @@ -70,11 +66,7 @@ zend_module_entry iconv_module_entry = { NULL, PHP_MINFO(miconv), PHP_ICONV_VERSION, - PHP_MODULE_GLOBALS(iconv), - PHP_GINIT(iconv), - NULL, - NULL, - STANDARD_MODULE_PROPERTIES_EX + STANDARD_MODULE_PROPERTIES, }; /* }}} */ @@ -85,18 +77,6 @@ ZEND_TSRMLS_CACHE_DEFINE() ZEND_GET_MODULE(iconv) #endif -/* {{{ PHP_GINIT_FUNCTION */ -static PHP_GINIT_FUNCTION(iconv) -{ -#if defined(COMPILE_DL_ICONV) && defined(ZTS) - ZEND_TSRMLS_CACHE_UPDATE(); -#endif - iconv_globals->input_encoding = NULL; - iconv_globals->output_encoding = NULL; - iconv_globals->internal_encoding = NULL; -} -/* }}} */ - #if defined(HAVE_LIBICONV) && defined(ICONV_ALIASED_LIBICONV) #define iconv libiconv #endif @@ -141,61 +121,11 @@ static const char _generic_superset_name[] = ICONV_UCS4_ENCODING; #define GENERIC_SUPERSET_NBYTES 4 /* }}} */ - -static PHP_INI_MH(OnUpdateInputEncoding) -{ - if (ZSTR_LEN(new_value) >= ICONV_CSNMAXLEN) { - return FAILURE; - } - if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { - php_error_docref("ref.iconv", E_DEPRECATED, "Use of iconv.input_encoding is deprecated"); - } - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); - return SUCCESS; -} - - -static PHP_INI_MH(OnUpdateOutputEncoding) -{ - if (ZSTR_LEN(new_value) >= ICONV_CSNMAXLEN) { - return FAILURE; - } - if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { - php_error_docref("ref.iconv", E_DEPRECATED, "Use of iconv.output_encoding is deprecated"); - } - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); - return SUCCESS; -} - - -static PHP_INI_MH(OnUpdateInternalEncoding) -{ - if (ZSTR_LEN(new_value) >= ICONV_CSNMAXLEN) { - return FAILURE; - } - if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { - php_error_docref("ref.iconv", E_DEPRECATED, "Use of iconv.internal_encoding is deprecated"); - } - OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage); - return SUCCESS; -} - - -/* {{{ PHP_INI */ -PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("iconv.input_encoding", "", PHP_INI_ALL, OnUpdateInputEncoding, input_encoding, zend_iconv_globals, iconv_globals) - STD_PHP_INI_ENTRY("iconv.output_encoding", "", PHP_INI_ALL, OnUpdateOutputEncoding, output_encoding, zend_iconv_globals, iconv_globals) - STD_PHP_INI_ENTRY("iconv.internal_encoding", "", PHP_INI_ALL, OnUpdateInternalEncoding, internal_encoding, zend_iconv_globals, iconv_globals) -PHP_INI_END() -/* }}} */ - /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(miconv) { char *version = "unknown"; - REGISTER_INI_ENTRIES(); - #ifdef HAVE_LIBICONV { static char buf[16]; @@ -234,7 +164,6 @@ PHP_MINIT_FUNCTION(miconv) PHP_MSHUTDOWN_FUNCTION(miconv) { php_iconv_stream_filter_unregister_factory(); - UNREGISTER_INI_ENTRIES(); return SUCCESS; } /* }}} */ @@ -252,33 +181,9 @@ PHP_MINFO_FUNCTION(miconv) php_info_print_table_row(2, "iconv implementation", Z_STRVAL_P(iconv_impl)); php_info_print_table_row(2, "iconv library version", Z_STRVAL_P(iconv_ver)); php_info_print_table_end(); - - DISPLAY_INI_ENTRIES(); } /* }}} */ -static const char *get_internal_encoding(void) { - if (ICONVG(internal_encoding) && ICONVG(internal_encoding)[0]) { - return ICONVG(internal_encoding); - } - return php_get_internal_encoding(); -} - -static const char *get_input_encoding(void) { - if (ICONVG(input_encoding) && ICONVG(input_encoding)[0]) { - return ICONVG(input_encoding); - } - return php_get_input_encoding(); -} - -static const char *get_output_encoding(void) { - if (ICONVG(output_encoding) && ICONVG(output_encoding)[0]) { - return ICONVG(output_encoding); - } - return php_get_output_encoding(); -} - - static int php_iconv_output_conflict(const char *handler_name, size_t handler_name_len) { if (php_output_get_level()) { @@ -319,12 +224,16 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c if (mimetype != NULL && !(output_context->op & PHP_OUTPUT_HANDLER_CLEAN)) { size_t len; - char *p = strstr(get_output_encoding(), "//"); + char *p = strstr(php_get_output_encoding(), "//"); if (p) { - len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%.*s", mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, (int) (p - get_output_encoding()), get_output_encoding()); + len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%.*s", + mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, + (int) (p - php_get_output_encoding()), php_get_output_encoding()); } else { - len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%s", mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, get_output_encoding()); + len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%s", + mimetype_len ? mimetype_len : (int) strlen(mimetype), + mimetype, php_get_output_encoding()); } if (content_type && SUCCESS == sapi_add_header(content_type, len, 0)) { SG(sapi_headers).send_default_content_type = 0; @@ -336,7 +245,9 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c if (output_context->in.used) { zend_string *out; output_context->out.free = 1; - _php_iconv_show_error(php_iconv_string(output_context->in.data, output_context->in.used, &out, get_output_encoding(), get_internal_encoding()), get_output_encoding(), get_internal_encoding()); + _php_iconv_show_error(php_iconv_string(output_context->in.data, output_context->in.used, &out, + php_get_output_encoding(), php_get_internal_encoding()), php_get_output_encoding(), + php_get_internal_encoding()); if (out) { output_context->out.data = estrndup(ZSTR_VAL(out), ZSTR_LEN(out)); output_context->out.used = ZSTR_LEN(out); @@ -1836,7 +1747,7 @@ PHP_FUNCTION(iconv_strlen) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -1872,7 +1783,7 @@ PHP_FUNCTION(iconv_substr) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -1913,7 +1824,7 @@ PHP_FUNCTION(iconv_strpos) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -1972,7 +1883,7 @@ PHP_FUNCTION(iconv_strrpos) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -2000,7 +1911,7 @@ PHP_FUNCTION(iconv_mime_encode) smart_str retval = {0}; php_iconv_err_t err; - const char *in_charset = get_internal_encoding(); + const char *in_charset = php_get_internal_encoding(); const char *out_charset = in_charset; zend_long line_len = 76; const char *lfchars = "\r\n"; @@ -2111,7 +2022,7 @@ PHP_FUNCTION(iconv_mime_decode) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -2152,7 +2063,7 @@ PHP_FUNCTION(iconv_mime_decode_headers) } if (charset == NULL) { - charset = get_internal_encoding(); + charset = php_get_internal_encoding(); } else if (charset_len >= ICONV_CSNMAXLEN) { php_error_docref(NULL, E_WARNING, "Charset parameter exceeds the maximum allowed length of %d characters", ICONV_CSNMAXLEN); RETURN_FALSE; @@ -2269,8 +2180,7 @@ PHP_FUNCTION(iconv_set_encoding) { char *type; zend_string *charset; - size_t type_len, retval; - zend_string *name; + size_t type_len; if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &type, &type_len, &charset) == FAILURE) { RETURN_THROWS(); @@ -2281,24 +2191,7 @@ PHP_FUNCTION(iconv_set_encoding) RETURN_FALSE; } - if(!strcasecmp("input_encoding", type)) { - name = zend_string_init("iconv.input_encoding", sizeof("iconv.input_encoding") - 1, 0); - } else if(!strcasecmp("output_encoding", type)) { - name = zend_string_init("iconv.output_encoding", sizeof("iconv.output_encoding") - 1, 0); - } else if(!strcasecmp("internal_encoding", type)) { - name = zend_string_init("iconv.internal_encoding", sizeof("iconv.internal_encoding") - 1, 0); - } else { - RETURN_FALSE; - } - - retval = zend_alter_ini_entry(name, charset, PHP_INI_USER, PHP_INI_STAGE_RUNTIME); - zend_string_release_ex(name, 0); - - if (retval == SUCCESS) { - RETURN_TRUE; - } else { - RETURN_FALSE; - } + RETURN_FALSE; } /* }}} */ @@ -2314,15 +2207,15 @@ PHP_FUNCTION(iconv_get_encoding) if (!strcasecmp("all", type)) { array_init(return_value); - add_assoc_string(return_value, "input_encoding", get_input_encoding()); - add_assoc_string(return_value, "output_encoding", get_output_encoding()); - add_assoc_string(return_value, "internal_encoding", get_internal_encoding()); + add_assoc_string(return_value, "input_encoding", php_get_input_encoding()); + add_assoc_string(return_value, "output_encoding", php_get_output_encoding()); + add_assoc_string(return_value, "internal_encoding", php_get_internal_encoding()); } else if (!strcasecmp("input_encoding", type)) { - RETVAL_STRING(get_input_encoding()); + RETVAL_STRING(php_get_input_encoding()); } else if (!strcasecmp("output_encoding", type)) { - RETVAL_STRING(get_output_encoding()); + RETVAL_STRING(php_get_output_encoding()); } else if (!strcasecmp("internal_encoding", type)) { - RETVAL_STRING(get_internal_encoding()); + RETVAL_STRING(php_get_internal_encoding()); } else { RETURN_FALSE; } diff --git a/ext/iconv/iconv.stub.php b/ext/iconv/iconv.stub.php index a5f6743e81c44..cffeb92efdbae 100644 --- a/ext/iconv/iconv.stub.php +++ b/ext/iconv/iconv.stub.php @@ -18,6 +18,8 @@ function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $char function iconv(string $in_charset, string $out_charset, string $str): string|false {} +/** @deprecated */ function iconv_set_encoding(string $type, string $charset): bool {} -function iconv_get_encoding(string $type = "all"): array|string|false {} +/** @deprecated */ +function iconv_get_encoding(string $type = 'all'): array|string|false {} diff --git a/ext/iconv/iconv_arginfo.h b/ext/iconv/iconv_arginfo.h index 3702e5739bdf2..b9d752e45eb57 100644 --- a/ext/iconv/iconv_arginfo.h +++ b/ext/iconv/iconv_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 4e26168b04450adf510a4e638184c46757679ac1 */ + * Stub hash: c299905ab2225a1d5d4f3dff5dbab019ccbb18b4 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_strlen, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0) @@ -56,7 +56,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_iconv_set_encoding, 0, 2, _IS_BO ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_iconv_get_encoding, 0, 0, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_FALSE) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\"all\"") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "\'all\'") ZEND_END_ARG_INFO() @@ -81,7 +81,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(iconv_mime_decode, arginfo_iconv_mime_decode) ZEND_FE(iconv_mime_decode_headers, arginfo_iconv_mime_decode_headers) ZEND_FE(iconv, arginfo_iconv) - ZEND_FE(iconv_set_encoding, arginfo_iconv_set_encoding) - ZEND_FE(iconv_get_encoding, arginfo_iconv_get_encoding) + ZEND_DEP_FE(iconv_set_encoding, arginfo_iconv_set_encoding) + ZEND_DEP_FE(iconv_get_encoding, arginfo_iconv_get_encoding) ZEND_FE_END }; diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 23cfdb09e9cbe..fcb5445da367f 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -65,18 +65,6 @@ PHP_FUNCTION(iconv_mime_encode); PHP_FUNCTION(iconv_mime_decode); PHP_FUNCTION(iconv_mime_decode_headers); -ZEND_BEGIN_MODULE_GLOBALS(iconv) - char *input_encoding; - char *internal_encoding; - char *output_encoding; -ZEND_END_MODULE_GLOBALS(iconv) - -#define ICONVG(v) ZEND_MODULE_GLOBALS_ACCESSOR(iconv, v) - -#if defined(ZTS) && defined(COMPILE_DL_ICONV) -ZEND_TSRMLS_CACHE_EXTERN() -#endif - #ifdef HAVE_IBM_ICONV # define ICONV_ASCII_ENCODING "IBM-850" # define ICONV_UCS4_ENCODING "UCS-4" diff --git a/ext/iconv/tests/iconv_default_charset.phpt b/ext/iconv/tests/iconv_default_charset.phpt index e0874820b25ef..d24e1b0f9ed33 100644 --- a/ext/iconv/tests/iconv_default_charset.phpt +++ b/ext/iconv/tests/iconv_default_charset.phpt @@ -6,14 +6,11 @@ extension_loaded('iconv') or die('skip'); function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build"); ?> --INI-- -error_reporting=E_ALL & ~E_DEPRECATED +error_reporting=E_ALL default_charset=UTF-8 internal_encoding= input_encoding= output_encoding= -iconv.internal_encoding= -iconv.input_encoding= -iconv.output_encoding= --FILE-- --EXPECT-- @@ -59,9 +45,9 @@ string(5) "UTF-8" string(0) "" string(0) "" string(0) "" -string(0) "" -string(0) "" -string(0) "" +bool(false) +bool(false) +bool(false) --- Altering encodings --- string(5) "UTF-8" @@ -71,7 +57,7 @@ string(10) "ISO-8859-1" string(0) "" string(0) "" string(0) "" -string(0) "" -string(0) "" -string(0) "" +bool(false) +bool(false) +bool(false) Done diff --git a/ext/iconv/tests/iconv_encoding_basic.phpt b/ext/iconv/tests/iconv_encoding_basic.phpt index 4af5b6a972667..eaea3bff9b336 100644 --- a/ext/iconv/tests/iconv_encoding_basic.phpt +++ b/ext/iconv/tests/iconv_encoding_basic.phpt @@ -6,10 +6,8 @@ extension_loaded('iconv') or die('skip'); function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build"); ?> --INI-- -error_reporting=E_ALL & ~E_DEPRECATED +error_reporting=E_ALL input_encoding=ISO-8859-1 -iconv.internal_encoding=ISO-8859-1 -iconv.output_encoding=ISO-8859-1 --FILE-- ---EXPECT-- +--EXPECTF-- *** Testing iconv_get_encoding()/iconv_set_encoding() : basic functionality *** --- Default get_encoding --- + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> string(10) "ISO-8859-1" ["output_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["internal_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" } + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(10) "ISO-8859-1" -string(10) "ISO-8859-1" -string(10) "ISO-8859-1" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> string(10) "ISO-8859-1" ["output_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["internal_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" } --- Altering encodings --- -bool(true) -bool(true) -bool(true) + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d +bool(false) + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d +bool(false) + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d +bool(false) --- results of alterations --- + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> - string(5) "UTF-8" + string(10) "ISO-8859-1" ["output_encoding"]=> string(5) "UTF-8" ["internal_encoding"]=> string(5) "UTF-8" } + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(10) "ISO-8859-1" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(5) "UTF-8" -string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> - string(5) "UTF-8" + string(10) "ISO-8859-1" ["output_encoding"]=> string(5) "UTF-8" ["internal_encoding"]=> diff --git a/ext/iconv/tests/iconv_get_encoding_basic.phpt b/ext/iconv/tests/iconv_get_encoding_basic.phpt index 84ee932e10568..c8ae03d006bce 100644 --- a/ext/iconv/tests/iconv_get_encoding_basic.phpt +++ b/ext/iconv/tests/iconv_get_encoding_basic.phpt @@ -6,7 +6,7 @@ Oystein Rose --SKIPIF-- --INI-- -error_reporting=E_ALL & ~E_DEPRECATED +error_reporting=E_ALL --FILE-- ---EXPECT-- +--EXPECTF-- +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> string(5) "UTF-8" @@ -47,7 +60,11 @@ array(3) { ["internal_encoding"]=> string(5) "UTF-8" } + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d bool(false) + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> string(5) "UTF-8" @@ -56,23 +73,41 @@ array(3) { ["internal_encoding"]=> string(5) "UTF-8" } -string(10) "ISO-8859-1" -string(10) "ISO-8859-1" -string(10) "ISO-8859-1" + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d +string(5) "UTF-8" + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["output_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["internal_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" } + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d bool(false) + +Deprecated: Function iconv_get_encoding() is deprecated in %s on line %d array(3) { ["input_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["output_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" ["internal_encoding"]=> - string(10) "ISO-8859-1" + string(5) "UTF-8" } diff --git a/ext/iconv/tests/iconv_ini_encoding.phpt b/ext/iconv/tests/iconv_ini_encoding.phpt deleted file mode 100644 index 5d2a2090fe1f2..0000000000000 --- a/ext/iconv/tests/iconv_ini_encoding.phpt +++ /dev/null @@ -1,68 +0,0 @@ ---TEST-- -Encoding INI test ---SKIPIF-- - ---INI-- -error_reporting=E_ALL & ~E_DEPRECATED -default_charset=ISO-8859-1 -internal_encoding= -input_encoding= -output_encoding= -iconv.internal_encoding=ISO-8859-1 -iconv.http_input=ISO-8859-1 -iconv.http_output=ISO-8859-1 ---FILE-- - --EXPECTF-- +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d bool(false) +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d bool(false) +Deprecated: Function iconv_set_encoding() is deprecated in %s on line %d + Warning: iconv_set_encoding(): Charset parameter exceeds the maximum allowed length of %d characters in %s on line %d bool(false) diff --git a/ext/iconv/tests/ob_iconv_handler.phpt b/ext/iconv/tests/ob_iconv_handler.phpt index 6caa4106f9112..4138676f97646 100644 --- a/ext/iconv/tests/ob_iconv_handler.phpt +++ b/ext/iconv/tests/ob_iconv_handler.phpt @@ -3,11 +3,11 @@ ob_iconv_handler() --SKIPIF-- --INI-- -error_reporting=2039 +error_reporting=E_ALL --FILE--