]> granicus.if.org Git - php/commitdiff
Remove mbstring.func_overload
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 28 Jan 2019 12:13:24 +0000 (13:13 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 28 Jan 2019 14:58:23 +0000 (15:58 +0100)
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.

16 files changed:
Zend/zend_compile.c
Zend/zend_compile.h
ext/mbstring/mbstring.c
ext/mbstring/mbstring.h
ext/mbstring/tests/bug52931.phpt [deleted file]
ext/mbstring/tests/mb_get_info.phpt
ext/mbstring/tests/mb_split.phpt
ext/mbstring/tests/mb_strlen.phpt
ext/mbstring/tests/mb_substr.phpt
ext/mbstring/tests/overload01.phpt [deleted file]
ext/mbstring/tests/overload02.phpt [deleted file]
ext/opcache/Optimizer/sccp.c
ext/opcache/tests/bug68644.phpt [deleted file]
ext/opcache/tests/bug75729.phpt [deleted file]
php.ini-development
php.ini-production

index 01c90559db7a48cfd051f4392ee73296d4939c33..cff2da7011aefc783fa5c9a59967e8b5f64d29ba 100644 (file)
@@ -3169,9 +3169,7 @@ int zend_compile_func_strlen(znode *result, zend_ast_list *args) /* {{{ */
 {
        znode arg_node;
 
-       if ((CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)
-               || args->children != 1
-       ) {
+       if (args->children != 1) {
                return FAILURE;
        }
 
index 5afdbcc625b55c2bedc24dc8bdcbd793ff30b51e..f46603322ef95da92298ec14b54714ab31edf9f4 100644 (file)
@@ -1035,9 +1035,6 @@ END_EXTERN_C()
 /* disable constant substitution at compile-time */
 #define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION   (1<<5)
 
-/* disable usage of builtin instruction for strlen() */
-#define ZEND_COMPILE_NO_BUILTIN_STRLEN          (1<<6)
-
 /* disable substitution of persistent constants at compile-time */
 #define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION       (1<<7)
 
index 17df6036dc285bcdde920af6e361984a44fca8a5..bba2d8ef69f8a5543231201f8a806b90490fddcd 100644 (file)
@@ -174,25 +174,6 @@ static const php_mb_nls_ident_list php_mb_default_identify_list[] = {
 
 /* }}} */
 
-/* {{{ mb_overload_def mb_ovld[] */
-static const struct mb_overload_def mb_ovld[] = {
-       {MB_OVERLOAD_MAIL, "mail", "mb_send_mail", "mb_orig_mail"},
-       {MB_OVERLOAD_STRING, "strlen", "mb_strlen", "mb_orig_strlen"},
-       {MB_OVERLOAD_STRING, "strpos", "mb_strpos", "mb_orig_strpos"},
-       {MB_OVERLOAD_STRING, "strrpos", "mb_strrpos", "mb_orig_strrpos"},
-       {MB_OVERLOAD_STRING, "stripos", "mb_stripos", "mb_orig_stripos"},
-       {MB_OVERLOAD_STRING, "strripos", "mb_strripos", "mb_orig_strripos"},
-       {MB_OVERLOAD_STRING, "strstr", "mb_strstr", "mb_orig_strstr"},
-       {MB_OVERLOAD_STRING, "strrchr", "mb_strrchr", "mb_orig_strrchr"},
-       {MB_OVERLOAD_STRING, "stristr", "mb_stristr", "mb_orig_stristr"},
-       {MB_OVERLOAD_STRING, "substr", "mb_substr", "mb_orig_substr"},
-       {MB_OVERLOAD_STRING, "strtolower", "mb_strtolower", "mb_orig_strtolower"},
-       {MB_OVERLOAD_STRING, "strtoupper", "mb_strtoupper", "mb_orig_strtoupper"},
-       {MB_OVERLOAD_STRING, "substr_count", "mb_substr_count", "mb_orig_substr_count"},
-       {0, NULL, NULL, NULL}
-};
-/* }}} */
-
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_language, 0, 0, 0)
        ZEND_ARG_INFO(0, language)
@@ -1486,8 +1467,6 @@ PHP_INI_BEGIN()
        PHP_INI_ENTRY("mbstring.http_output", NULL, PHP_INI_ALL, OnUpdate_mbstring_http_output)
        STD_PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_internal_encoding, internal_encoding_name, zend_mbstring_globals, mbstring_globals)
        PHP_INI_ENTRY("mbstring.substitute_character", NULL, PHP_INI_ALL, OnUpdate_mbstring_substitute_character)
-       STD_PHP_INI_ENTRY("mbstring.func_overload", "0",
-       PHP_INI_SYSTEM, OnUpdateLong, func_overload, zend_mbstring_globals, mbstring_globals)
 
        STD_PHP_INI_BOOLEAN("mbstring.encoding_translation", "0",
                PHP_INI_SYSTEM | PHP_INI_PERDIR,
@@ -1535,7 +1514,6 @@ ZEND_TSRMLS_CACHE_UPDATE();
        mbstring_globals->current_filter_illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
        mbstring_globals->current_filter_illegal_substchar = 0x3f;      /* '?' */
        mbstring_globals->illegalchars = 0;
-       mbstring_globals->func_overload = 0;
        mbstring_globals->encoding_translation = 0;
        mbstring_globals->strict_detection = 0;
        mbstring_globals->outconv = NULL;
@@ -1584,10 +1562,6 @@ ZEND_TSRMLS_CACHE_UPDATE();
                sapi_register_post_entries(mbstr_post_entries);
        }
 
-       REGISTER_LONG_CONSTANT("MB_OVERLOAD_MAIL", MB_OVERLOAD_MAIL, CONST_CS | CONST_PERSISTENT);
-       REGISTER_LONG_CONSTANT("MB_OVERLOAD_STRING", MB_OVERLOAD_STRING, CONST_CS | CONST_PERSISTENT);
-       REGISTER_LONG_CONSTANT("MB_OVERLOAD_REGEX", MB_OVERLOAD_REGEX, CONST_CS | CONST_PERSISTENT);
-
        REGISTER_LONG_CONSTANT("MB_CASE_UPPER", PHP_UNICODE_CASE_UPPER, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("MB_CASE_LOWER", PHP_UNICODE_CASE_LOWER, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("MB_CASE_TITLE", PHP_UNICODE_CASE_TITLE, CONST_CS | CONST_PERSISTENT);
@@ -1613,39 +1587,6 @@ ZEND_TSRMLS_CACHE_UPDATE();
                php_mb_rfc1867_getword_conf,
                php_mb_rfc1867_basename);
 
-       /* override original function (deprecated). */
-       if (MBSTRG(func_overload)){
-               zend_function *func, *orig;
-               const struct mb_overload_def *p;
-               zend_string *str;
-
-               p = &(mb_ovld[0]);
-               while (p->type > 0) {
-                       if ((MBSTRG(func_overload) & p->type) == p->type &&
-                               !zend_hash_str_exists(CG(function_table), p->save_func, strlen(p->save_func))
-                       ) {
-                               func = zend_hash_str_find_ptr(CG(function_table), p->ovld_func, strlen(p->ovld_func));
-
-                               if ((orig = zend_hash_str_find_ptr(CG(function_table), p->orig_func, strlen(p->orig_func))) == NULL) {
-                                       php_error_docref("ref.mbstring", E_WARNING, "mbstring couldn't find function %s.", p->orig_func);
-                                       return FAILURE;
-                               } else {
-                                       ZEND_ASSERT(orig->type == ZEND_INTERNAL_FUNCTION);
-                                       str = zend_string_init_interned(p->save_func, strlen(p->save_func), 1);
-                                       zend_hash_add_mem(CG(function_table), str, orig, sizeof(zend_internal_function));
-                                       zend_string_release_ex(str, 1);
-                                       function_add_ref(orig);
-
-                                       str = zend_string_init_interned(p->orig_func, strlen(p->orig_func), 1);
-                                       zend_hash_update_mem(CG(function_table), str, func, sizeof(zend_internal_function));
-                                       zend_string_release_ex(str, 1);
-                                       function_add_ref(func);
-                               }
-                       }
-                       p++;
-               }
-       }
-
        return SUCCESS;
 }
 /* }}} */
@@ -1653,24 +1594,6 @@ ZEND_TSRMLS_CACHE_UPDATE();
 /* {{{ PHP_MSHUTDOWN_FUNCTION(mbstring) */
 PHP_MSHUTDOWN_FUNCTION(mbstring)
 {
-       /*  clear overloaded function. */
-       if (MBSTRG(func_overload)){
-               const struct mb_overload_def *p;
-               zend_function *orig;
-
-               p = &(mb_ovld[0]);
-               while (p->type > 0) {
-                       if ((MBSTRG(func_overload) & p->type) == p->type &&
-                               (orig = zend_hash_str_find_ptr(CG(function_table), p->save_func, strlen(p->save_func)))) {
-
-                               zend_hash_str_update_mem(CG(function_table), p->orig_func, strlen(p->orig_func), orig, sizeof(zend_internal_function));
-                               function_add_ref(orig);
-                               zend_hash_str_del(CG(function_table), p->save_func, strlen(p->save_func));
-                       }
-                       p++;
-               }
-       }
-
        UNREGISTER_INI_ENTRIES();
 
        zend_multibyte_restore_functions();
@@ -1695,12 +1618,6 @@ PHP_RINIT_FUNCTION(mbstring)
 
        php_mb_populate_current_detect_order_list();
 
-       /* override original function. */
-       if (MBSTRG(func_overload)){
-               zend_error(E_DEPRECATED, "The mbstring.func_overload directive is deprecated");
-
-               CG(compiler_options) |= ZEND_COMPILE_NO_BUILTIN_STRLEN;
-       }
 #if HAVE_MBREGEX
        PHP_RINIT(mb_regex) (INIT_FUNC_ARGS_PASSTHRU);
 #endif
@@ -2782,11 +2699,6 @@ PHP_FUNCTION(mb_substr)
                real_len = 0;
        }
 
-       if (((MBSTRG(func_overload) & MB_OVERLOAD_STRING) == MB_OVERLOAD_STRING)
-               && (real_from > mbfl_strlen(&string))) {
-               RETURN_FALSE;
-       }
-
        ret = mbfl_substr(&string, &result, real_from, real_len);
        if (NULL == ret) {
                RETURN_FALSE;
@@ -4411,8 +4323,7 @@ PHP_FUNCTION(mb_get_info)
        size_t typ_len;
        size_t n;
        char *name;
-       const struct mb_overload_def *over_func;
-       zval row1, row2;
+       zval row;
        const mbfl_language *lang = mbfl_no2language(MBSTRG(language));
        const mbfl_encoding **entry;
 
@@ -4434,20 +4345,6 @@ PHP_FUNCTION(mb_get_info)
                if ((name = (char *)zend_ini_string("mbstring.http_output_conv_mimetypes", sizeof("mbstring.http_output_conv_mimetypes") - 1, 0)) != NULL) {
                        add_assoc_string(return_value, "http_output_conv_mimetypes", name);
                }
-               add_assoc_long(return_value, "func_overload", MBSTRG(func_overload));
-               if (MBSTRG(func_overload)){
-                       over_func = &(mb_ovld[0]);
-                       array_init(&row1);
-                       while (over_func->type > 0) {
-                               if ((MBSTRG(func_overload) & over_func->type) == over_func->type ) {
-                                       add_assoc_string(&row1, over_func->orig_func, over_func->ovld_func);
-                               }
-                               over_func++;
-                       }
-                       add_assoc_zval(return_value, "func_overload_list", &row1);
-               } else {
-                       add_assoc_string(return_value, "func_overload_list", "no overload");
-               }
                if (lang != NULL) {
                        if ((name = (char *)mbfl_no_encoding2name(lang->mail_charset)) != NULL) {
                                add_assoc_string(return_value, "mail_charset", name);
@@ -4472,12 +4369,12 @@ PHP_FUNCTION(mb_get_info)
                entry = MBSTRG(current_detect_order_list);
                if (n > 0) {
                        size_t i;
-                       array_init(&row2);
+                       array_init(&row);
                        for (i = 0; i < n; i++) {
-                               add_next_index_string(&row2, (*entry)->name);
+                               add_next_index_string(&row, (*entry)->name);
                                entry++;
                        }
-                       add_assoc_zval(return_value, "detect_order", &row2);
+                       add_assoc_zval(return_value, "detect_order", &row);
                }
                if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) {
                        add_assoc_string(return_value, "substitute_character", "none");
@@ -4509,21 +4406,6 @@ PHP_FUNCTION(mb_get_info)
                if ((name = (char *)zend_ini_string("mbstring.http_output_conv_mimetypes", sizeof("mbstring.http_output_conv_mimetypes") - 1, 0)) != NULL) {
                        RETVAL_STRING(name);
                }
-       } else if (!strcasecmp("func_overload", typ)) {
-               RETVAL_LONG(MBSTRG(func_overload));
-       } else if (!strcasecmp("func_overload_list", typ)) {
-               if (MBSTRG(func_overload)){
-                               over_func = &(mb_ovld[0]);
-                               array_init(return_value);
-                               while (over_func->type > 0) {
-                                       if ((MBSTRG(func_overload) & over_func->type) == over_func->type ) {
-                                               add_assoc_string(return_value, over_func->orig_func, over_func->ovld_func);
-                                       }
-                                       over_func++;
-                               }
-               } else {
-                       RETVAL_STRING("no overload");
-               }
        } else if (!strcasecmp("mail_charset", typ)) {
                if (lang != NULL && (name = (char *)mbfl_no_encoding2name(lang->mail_charset)) != NULL) {
                        RETVAL_STRING(name);
index 5c14cf67cb9f3ceaff3f6277099eea75ff512ab6..08434f04672d26fe108aeac237b7a4158e20be3c 100644 (file)
@@ -155,7 +155,6 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring)
        int filter_illegal_substchar;
        int current_filter_illegal_mode;
        int current_filter_illegal_substchar;
-       zend_long func_overload;
        enum mbfl_no_language language;
        zend_bool encoding_translation;
        zend_bool strict_detection;
@@ -169,17 +168,6 @@ ZEND_BEGIN_MODULE_GLOBALS(mbstring)
        const mbfl_encoding *last_used_encoding;
 ZEND_END_MODULE_GLOBALS(mbstring)
 
-#define MB_OVERLOAD_MAIL 1
-#define MB_OVERLOAD_STRING 2
-#define MB_OVERLOAD_REGEX 4
-
-struct mb_overload_def {
-       int type;
-       char *orig_func;
-       char *ovld_func;
-       char *save_func;
-};
-
 #define MBSTRG(v) ZEND_MODULE_GLOBALS_ACCESSOR(mbstring, v)
 
 #if defined(ZTS) && defined(COMPILE_DL_MBSTRING)
diff --git a/ext/mbstring/tests/bug52931.phpt b/ext/mbstring/tests/bug52931.phpt
deleted file mode 100644 (file)
index ab8c8df..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-Bug #52931 (strripos not overloaded with function overloading enabled)
---SKIPIF--
-<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
---INI--
-mbstring.func_overload = 7
-mbstring.internal_encoding = utf-8
---FILE--
-<?php
-
-$string = '<body>Umlauttest öüä</body>';
-
-var_dump(strlen($string));
-var_dump(mb_strlen($string));
-
-var_dump(strripos($string, '</body>'));
-var_dump(mb_strripos($string, '</body>'));
-
-?>
---EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-int(27)
-int(27)
-int(20)
-int(20)
index 5b9c0c0aef185893e65ea95ac514ef2190865f2f..4b08b9943ff5bfce1c3e620c03a0ccba51ef0898 100644 (file)
@@ -9,7 +9,6 @@ mbstring.internal_encoding=UTF-8
 mbstring.http_input=ISO-8859-1
 mbstring.http_output=ISO-8859-15
 mbstring.http_output_conv_mimetypes=abc
-mbstring.func_overload=2
 mbstring.detect_order=UTF-8,ISO-8859-15,ISO-8859-1,ASCII
 mbstring.substitute_character=123
 mbstring.strict_detection=1
@@ -24,8 +23,7 @@ foreach (array_keys($result) as $key) {
 }
 ?>
 --EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-array(15) {
+array(13) {
   ["internal_encoding"]=>
   string(5) "UTF-8"
   ["http_input"]=>
@@ -34,35 +32,6 @@ array(15) {
   string(11) "ISO-8859-15"
   ["http_output_conv_mimetypes"]=>
   string(3) "abc"
-  ["func_overload"]=>
-  int(2)
-  ["func_overload_list"]=>
-  array(12) {
-    ["strlen"]=>
-    string(9) "mb_strlen"
-    ["strpos"]=>
-    string(9) "mb_strpos"
-    ["strrpos"]=>
-    string(10) "mb_strrpos"
-    ["stripos"]=>
-    string(10) "mb_stripos"
-    ["strripos"]=>
-    string(11) "mb_strripos"
-    ["strstr"]=>
-    string(9) "mb_strstr"
-    ["strrchr"]=>
-    string(10) "mb_strrchr"
-    ["stristr"]=>
-    string(10) "mb_stristr"
-    ["substr"]=>
-    string(9) "mb_substr"
-    ["strtolower"]=>
-    string(13) "mb_strtolower"
-    ["strtoupper"]=>
-    string(13) "mb_strtoupper"
-    ["substr_count"]=>
-    string(15) "mb_substr_count"
-  }
   ["mail_charset"]=>
   string(11) "ISO-2022-KR"
   ["mail_header_encoding"]=>
@@ -99,60 +68,6 @@ string(11) "ISO-8859-15"
 string(11) "ISO-8859-15"
 string(3) "abc"
 string(3) "abc"
-int(2)
-int(2)
-array(12) {
-  ["strlen"]=>
-  string(9) "mb_strlen"
-  ["strpos"]=>
-  string(9) "mb_strpos"
-  ["strrpos"]=>
-  string(10) "mb_strrpos"
-  ["stripos"]=>
-  string(10) "mb_stripos"
-  ["strripos"]=>
-  string(11) "mb_strripos"
-  ["strstr"]=>
-  string(9) "mb_strstr"
-  ["strrchr"]=>
-  string(10) "mb_strrchr"
-  ["stristr"]=>
-  string(10) "mb_stristr"
-  ["substr"]=>
-  string(9) "mb_substr"
-  ["strtolower"]=>
-  string(13) "mb_strtolower"
-  ["strtoupper"]=>
-  string(13) "mb_strtoupper"
-  ["substr_count"]=>
-  string(15) "mb_substr_count"
-}
-array(12) {
-  ["strlen"]=>
-  string(9) "mb_strlen"
-  ["strpos"]=>
-  string(9) "mb_strpos"
-  ["strrpos"]=>
-  string(10) "mb_strrpos"
-  ["stripos"]=>
-  string(10) "mb_stripos"
-  ["strripos"]=>
-  string(11) "mb_strripos"
-  ["strstr"]=>
-  string(9) "mb_strstr"
-  ["strrchr"]=>
-  string(10) "mb_strrchr"
-  ["stristr"]=>
-  string(10) "mb_stristr"
-  ["substr"]=>
-  string(9) "mb_substr"
-  ["strtolower"]=>
-  string(13) "mb_strtolower"
-  ["strtoupper"]=>
-  string(13) "mb_strtoupper"
-  ["substr_count"]=>
-  string(15) "mb_substr_count"
-}
 string(11) "ISO-2022-KR"
 string(11) "ISO-2022-KR"
 string(6) "BASE64"
index 216beec1ccc318839140df3f78f9818a5055a64f..cf4f3e4d262455b789598c092d16b0073baabc4e 100644 (file)
@@ -6,8 +6,6 @@ extension_loaded('mbstring') or die('skip mbstring not available');
 extension_loaded('pcre') or die('skip pcre not available');
 function_exists('mb_split') or die("skip mb_split() is not available in this build");
 ?>
---INI--
-mbstring.func_overload=0
 --FILE--
 <?php
        mb_regex_set_options( '' );
index 0ab540b959e1a89210f8f26edb1a0f642b0bce4a..120824410b0d24a4329c7dc36507aaa1891db19e 100644 (file)
@@ -2,8 +2,6 @@
 mb_strlen()
 --SKIPIF--
 <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
---INI--
-mbstring.func_overload=0
 --FILE--
 <?php
 // TODO: Add more encodings
index 28b35ea9101470d54bb3fe22d7e094c45ffe9f86..ab4f7c17d69538af26044c10942c1527c31d2951 100644 (file)
@@ -4,7 +4,6 @@ mb_substr()
 <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
 --INI--
 output_handler=
-mbstring.func_overload=0
 --FILE--
 <?php
 // TODO: Add more encodings
diff --git a/ext/mbstring/tests/overload01.phpt b/ext/mbstring/tests/overload01.phpt
deleted file mode 100644 (file)
index 4e6802b..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---TEST--
-Function overloading test 1
---SKIPIF--
-<?php
-       extension_loaded('mbstring') or die('skip mbstring not available');
-?>
---INI--
-output_handler=
-mbstring.func_overload=7
-mbstring.internal_encoding=EUC-JP
---FILE--
-<?php
-echo mb_internal_encoding()."\n";
-
-$ngchars = array('ǽ','ɽ','»½','¥½');
-$str = '¸µÏ½ÍÜ»½Ðò¼Òº¾µ½É½¸½Ç½ÎÏɽ¼¨±½ÌÈÄä˽ÎÏŽÉÕ¹½Ê¸·½»ÒͽÃÎñ½Æ¬¥½¥Õ¥¡¡¼';
-var_dump(strlen($str));
-var_dump(mb_strlen($str));
---EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-EUC-JP
-int(33)
-int(33)
diff --git a/ext/mbstring/tests/overload02.phpt b/ext/mbstring/tests/overload02.phpt
deleted file mode 100644 (file)
index 2aa30ad..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
---TEST--
-Function overloading test 2
---SKIPIF--
-<?php
-       extension_loaded('mbstring') or die('skip mbstring not available');
-       if (!function_exists("mb_ereg_replace")) {
-               die('skip mb_ereg_replace() function is not available.');
-       }
-?>
---INI--
-output_handler=
-mbstring.func_overload=7
-mbstring.internal_encoding=EUC-JP
---FILE--
-<?php
-echo mb_internal_encoding()."\n";
-
-$ngchars = array('ǽ','ɽ','»½','¥½');
-$str = '¸µÏ½ÍÜ»½Ðò¼Òº¾µ½É½¸½Ç½ÎÏɽ¼¨±½ÌÈÄä˽ÎÏŽÉÕ¹½Ê¸·½»ÒͽÃÎñ½Æ¬¥½¥Õ¥¡¡¼';
-$converted_str = mb_convert_encoding($str, 'Shift_JIS');
-mb_regex_encoding('Shift_JIS');
-foreach($ngchars as $c) {
-       $c = mb_convert_encoding($c, 'Shift_JIS');
-       $replaced = mb_convert_encoding(str_replace($c, '!!', $converted_str), mb_internal_encoding(), 'Shift_JIS');
-       var_dump(strpos($replaced, '!!'));
-}
-?>
---EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-EUC-JP
-int(10)
-int(8)
-int(3)
-int(29)
index 0eb042f5f266933229b81548923c0f8f5001a533..49e3c4f622597a0fde2320a1ecfffd111d2a67c0 100644 (file)
@@ -834,8 +834,7 @@ static inline int ct_eval_func_call(
                } else if (zend_string_equals_literal(name, "strpos")) {
                        if (Z_TYPE_P(args[0]) != IS_STRING
                                        || Z_TYPE_P(args[1]) != IS_STRING
-                                       || !Z_STRLEN_P(args[1])
-                                       || (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) {
+                                       || !Z_STRLEN_P(args[1])) {
                                return FAILURE;
                        }
                        /* pass */
@@ -914,8 +913,7 @@ static inline int ct_eval_func_call(
                        /* pass */
                } else if (zend_string_equals_literal(name, "substr")) {
                        if (Z_TYPE_P(args[0]) != IS_STRING
-                                       || Z_TYPE_P(args[1]) != IS_LONG
-                                       || (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) {
+                                       || Z_TYPE_P(args[1]) != IS_LONG) {
                                return FAILURE;
                        }
                        /* pass */
@@ -959,8 +957,7 @@ static inline int ct_eval_func_call(
                } else if (zend_string_equals_literal(name, "substr")) {
                        if (Z_TYPE_P(args[0]) != IS_STRING
                                        || Z_TYPE_P(args[1]) != IS_LONG
-                                       || Z_TYPE_P(args[2]) != IS_LONG
-                                       || (CG(compiler_options) & ZEND_COMPILE_NO_BUILTIN_STRLEN)) {
+                                       || Z_TYPE_P(args[2]) != IS_LONG) {
                                return FAILURE;
                        }
                        /* pass */
diff --git a/ext/opcache/tests/bug68644.phpt b/ext/opcache/tests/bug68644.phpt
deleted file mode 100644 (file)
index b82615a..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-Bug #68644 strlen incorrect : mbstring + func_overload=2 + UTF-8 + Opcache
---INI--
-opcache.enable=1
-opcache.enable_cli=1
-mbstring.func_overload=2
-mbstring.internal_encoding=UTF-8
---SKIPIF--
-<?php if (!extension_loaded('Zend OPcache') || !extension_loaded("mbstring")) die("skip"); ?>
---FILE--
-<?php
-var_dump(strlen("中国, 北京"));
-var_dump(mb_strlen("中国, 北京"));
-?>
---EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-int(6)
-int(6)
diff --git a/ext/opcache/tests/bug75729.phpt b/ext/opcache/tests/bug75729.phpt
deleted file mode 100644 (file)
index 81d8f42..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
---TEST--
-Bug #75729: opcache segfault when installing Bitrix
---SKIPIF--
-<?php if (!extension_loaded('mbstring')) die('skip mbstring not loaded'); ?>
---INI--
-opcache.enable_cli=1
-mbstring.func_overload=2
---FILE--
-<?php
-
-var_dump(strpos("foo", "o"));
-var_dump(substr("foo", 1));
-var_dump(substr("foo", 1, 1));
-
-?>
---EXPECT--
-Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
-int(1)
-string(2) "oo"
-string(1) "o"
index 64c938ae0d07d75eaa193a7190739108c25f0d9f..d7445e6d9b094c7aee237093c49ee9c1eb4bad38 100644 (file)
@@ -1672,17 +1672,6 @@ zend.assertions = 1
 ; http://php.net/mbstring.substitute-character
 ;mbstring.substitute_character = none
 
-; overload(replace) single byte functions by mbstring functions.
-; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
-; etc. Possible values are 0,1,2,4 or combination of them.
-; For example, 7 for overload everything.
-; 0: No overload
-; 1: Overload mail() function
-; 2: Overload str*() functions
-; 4: Overload ereg*() functions
-; http://php.net/mbstring.func-overload
-;mbstring.func_overload = 0
-
 ; enable strict encoding detection.
 ; Default: Off
 ;mbstring.strict_detection = On
index 98ab119168f09e67cdb72e12cf6638f9df0bba5e..5b7f827aa3be8c8918bb0d4b23e55b8ccf9d49c7 100644 (file)
@@ -1672,17 +1672,6 @@ zend.assertions = -1
 ; http://php.net/mbstring.substitute-character
 ;mbstring.substitute_character = none
 
-; overload(replace) single byte functions by mbstring functions.
-; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
-; etc. Possible values are 0,1,2,4 or combination of them.
-; For example, 7 for overload everything.
-; 0: No overload
-; 1: Overload mail() function
-; 2: Overload str*() functions
-; 4: Overload ereg*() functions
-; http://php.net/mbstring.func-overload
-;mbstring.func_overload = 0
-
 ; enable strict encoding detection.
 ; Default: Off
 ;mbstring.strict_detection = On