Gen. partnerAlgotech

PHP function strripos()

Find position of last occurrence of a case-insensitive string in a string

|
September 11, 2019

Availability in PHP 5.0

Find position of last occurrence of a case-insensitive string in a string

Parameters

Parameter Data type Default value Note
$haystack string not The string to search in
$needle string not Note that the needle may be a string of one or more characters.
$offset int null The offset parameter may be specified to begin searching an arbitrary number of characters into the string.

Return values

int

the numerical position of the last occurrence of needle. Also note that string positions start at 0, and not 1.

If needle is not found, false is returned.

Other resources

Official strripos documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.