File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -2600,6 +2600,9 @@ PHP_FUNCTION(mb_strrpos)
2600
2600
break ;
2601
2601
default :
2602
2602
enc_name = Z_STR_P (zoffset );
2603
+ php_error_docref (NULL , E_DEPRECATED ,
2604
+ "Passing the encoding as third parameter is deprecated. "
2605
+ "Use an explicit zero offset" );
2603
2606
break ;
2604
2607
}
2605
2608
} else {
Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ mb_internal_encoding('UTF-16');
9
9
var_dump (mb_strrpos ("abc abc abc " , "abc " , "UTF-8 " ));
10
10
11
11
?>
12
- --EXPECT--
12
+ --EXPECTF--
13
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
13
14
int(8)
Original file line number Diff line number Diff line change @@ -38,24 +38,36 @@ foreach ($inputs as $type => $input) {
38
38
39
39
echo "Done " ;
40
40
?>
41
- --EXPECT --
41
+ --EXPECTF --
42
42
*** Testing mb_strrpos() : usage variations ***
43
43
44
44
-- Double Quoted String --
45
45
-- With fourth encoding argument --
46
+
47
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
46
48
int(20)
47
49
-- Without fourth encoding argument --
50
+
51
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
48
52
int(20)
49
53
50
54
-- Single Quoted String --
51
55
-- With fourth encoding argument --
56
+
57
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
52
58
int(20)
53
59
-- Without fourth encoding argument --
60
+
61
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
54
62
int(20)
55
63
56
64
-- Heredoc --
57
65
-- With fourth encoding argument --
66
+
67
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
58
68
int(20)
59
69
-- Without fourth encoding argument --
70
+
71
+ Deprecated: mb_strrpos(): Passing the encoding as third parameter is deprecated. Use an explicit zero offset in %s on line %d
60
72
int(20)
61
73
Done
You can’t perform that action at this time.
0 commit comments