Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find the position of the last occurrence of a substring in a string
<?php strrpos(string $haystack, string $needle, int $offset = 0): int|false
<?php         }



        if (isset($this->doublesSeparators[$regexFirstChar])) {

            $regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);

        } else {

            $regexEndPos = \strrpos($regex, $regexFirstChar);

        }
<?php         if (isset($this->doublesSeparators[$regexFirstChar])) {

            $regexEndPos = \strrpos($regex, $this->doublesSeparators[$regexFirstChar]);

        } else {

            $regexEndPos = \strrpos($regex, $regexFirstChar);

        }



        if ($regexEndPos === false) {