--TEST-- Test mb_strpos() function : mb_strpos bounds check is byte count rather than a character count --SKIPIF-- --FILE-- getMessage() . \PHP_EOL; } echo"--ASCII String:--\n"; try { var_dump(mb_strpos('This is na English ta', 'a', $i)); } catch (\ValueError $e) { echo $e->getMessage() . \PHP_EOL; } } ?> --EXPECT-- -- Offset is 20 -- --Multibyte String:-- int(20) --ASCII String:-- int(20) -- Offset is 21 -- --Multibyte String:-- bool(false) --ASCII String:-- bool(false) -- Offset is 22 -- --Multibyte String:-- Offset not contained in string --ASCII String:-- Offset not contained in string -- Offset is 53 -- --Multibyte String:-- Offset not contained in string --ASCII String:-- Offset not contained in string -- Offset is 54 -- --Multibyte String:-- Offset not contained in string --ASCII String:-- Offset not contained in string