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 (str_contains($table, '.')) {

            $table = substr_replace($table, '.'.$this->tablePrefix, strrpos($table, '.'), 1);



            return collect(explode('.', $table))

                ->map($this->wrapValue(...))
<?php     protected function createIndexName($type, array $columns)

    {

        $table = str_contains($this->table, '.')

            ? substr_replace($this->table, '.'.$this->prefix, strrpos($this->table, '.'), 1)

            : $this->prefix.$this->table;



        $index = strtolower($table.'_'.implode('_', $columns).'_'.$type);
<?php     {

        $header = $this->header('Authorization', '');



        $position = strrpos($header, 'Bearer ');



        if ($position !== false) {

            $header = substr($header, $position + 7);
<?php             return $subject;

        }



        $position = strrpos($subject, (string) $search);



        if ($position === false) {

            return $subject;
<?php             return $subject;

        }



        $position = strrpos($subject, $search);



        if ($position !== false) {

            return substr_replace($subject, $replace, $position, strlen($search));