1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Added negative offset test for mb_strrpos

Should expose https://github.com/php/php-src/issues/11217
This commit is contained in:
Randy Geraads
2023-05-10 13:25:39 +02:00
committed by Ilija Tovilo
parent aa553af911
commit c5a623ba5e

View File

@@ -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)