in src/str/utf8/introspect.php [94:107]
function search_last(string $haystack, string $needle, int $offset = 0)[rx_local]: ?int {
$haystack_length = length($haystack);
invariant(
$offset >= -$haystack_length && $offset <= $haystack_length,
'Offset is out-of-bounds.',
);
/* HH_FIXME[2049] __PHPStdLib */
/* HH_FIXME[4107] __PHPStdLib */
$position = \mb_strrpos($haystack, $needle, $offset, Encoding::UTF8);
if ($position === false) {
return null;
}
return $position;
}