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)
26002600 break ;
26012601 default :
26022602 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" );
26032606 break ;
26042607 }
26052608 } else {
Original file line number Diff line number Diff line change @@ -9,5 +9,6 @@ mb_internal_encoding('UTF-16');
99var_dump (mb_strrpos ("abc abc abc " , "abc " , "UTF-8 " ));
1010
1111?>
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
1314int(8)
Original file line number Diff line number Diff line change @@ -38,24 +38,36 @@ foreach ($inputs as $type => $input) {
3838
3939echo "Done " ;
4040?>
41- --EXPECT --
41+ --EXPECTF --
4242*** Testing mb_strrpos() : usage variations ***
4343
4444-- Double Quoted String --
4545-- 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
4648int(20)
4749-- 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
4852int(20)
4953
5054-- Single Quoted String --
5155-- 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
5258int(20)
5359-- 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
5462int(20)
5563
5664-- Heredoc --
5765-- 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
5868int(20)
5969-- 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
6072int(20)
6173Done
You can’t perform that action at this time.
0 commit comments