strrpos

PHP 4, PHP 5, PHP 7, PHP 8
strrpos - Find the position of the last occurrence of a substring in a string
Strrpos Online Tool
Manual
Code Examples

Example #1 Searching with offsets

Result: int(0) bool(false) int(27) bool(false) int(17) bool(false) int(29)
PHP Version:

Example #2 Checking if a needle is in the haystack

PHP Version:


Example #3 of strrpos

PHP Version:


Function strrpos:

Strings Functions

Most used PHP functions