Skip to content

Commit a8239ff

Browse files
committed
Deprecate mbstring.func_overload
1 parent c61daf4 commit a8239ff

File tree

6 files changed

+7
-1
lines changed

6 files changed

+7
-1
lines changed

Diff for: ext/mbstring/mbstring.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1644,8 +1644,9 @@ PHP_RINIT_FUNCTION(mbstring)
16441644

16451645
/* override original function. */
16461646
if (MBSTRG(func_overload)){
1647-
p = &(mb_ovld[0]);
1647+
zend_error(E_DEPRECATED, "The mbstring.func_overload directive is deprecated");
16481648

1649+
p = &(mb_ovld[0]);
16491650
CG(compiler_options) |= ZEND_COMPILE_NO_BUILTIN_STRLEN;
16501651
while (p->type > 0) {
16511652
if ((MBSTRG(func_overload) & p->type) == p->type &&

Diff for: ext/mbstring/tests/bug52931.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var_dump(mb_strripos($string, '</body>'));
1818

1919
?>
2020
--EXPECTF--
21+
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
2122
int(27)
2223
int(27)
2324
int(20)

Diff for: ext/mbstring/tests/mb_get_info.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ foreach (array_keys($result) as $key) {
2424
}
2525
?>
2626
--EXPECT--
27+
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
2728
array(15) {
2829
["internal_encoding"]=>
2930
string(5) "UTF-8"

Diff for: ext/mbstring/tests/overload01.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $str = '
2020
var_dump(strlen($str));
2121
var_dump(mb_strlen($str));
2222
--EXPECT--
23+
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
2324
EUC-JP
2425
int(33)
2526
int(33)

Diff for: ext/mbstring/tests/overload02.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ foreach($ngchars as $c) {
2929
}
3030
?>
3131
--EXPECT--
32+
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
3233
EUC-JP
3334
int(10)
3435
int(8)

Diff for: ext/opcache/tests/bug68644.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ var_dump(strlen("中国, 北京"));
1313
var_dump(mb_strlen("中国, 北京"));
1414
?>
1515
--EXPECT--
16+
Deprecated: The mbstring.func_overload directive is deprecated in Unknown on line 0
1617
int(6)
1718
int(6)

0 commit comments

Comments
 (0)