mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Added negative offset test for mb_strrpos
Should expose https://github.com/php/php-src/issues/11217
This commit is contained in:
parent
aa553af911
commit
c5a623ba5e
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,9 @@ var_dump(mb_strrpos($string_ascii, 'is', 4, 'ISO-8859-1'));
|
|||
echo "\n-- ASCII string 2 --\n";
|
||||
var_dump(mb_strrpos($string_ascii, 'hello, world'));
|
||||
|
||||
echo "\n-- ASCII string with negative offset --\n";
|
||||
var_dump(mb_strrpos($string_ascii, 'hello', -1, 'ISO-8859-1'));
|
||||
|
||||
echo "\n-- Multibyte string 1 --\n";
|
||||
$needle1 = base64_decode('44CC');
|
||||
var_dump(mb_strrpos($string_mb, $needle1));
|
||||
|
@ -41,6 +44,9 @@ int(15)
|
|||
-- ASCII string 2 --
|
||||
bool(false)
|
||||
|
||||
-- ASCII string with negative offset --
|
||||
bool(false)
|
||||
|
||||
-- Multibyte string 1 --
|
||||
int(20)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue