Gen. partnerAlgotech

PHP function strrchr()

Find the last occurrence of a character in a string

|
September 11, 2019

Availability in PHP 4.0

Find the last occurrence of a character in a string

Parameters

Parameter Data type Default value Note
$haystack string not The string to search in
$needle mixed not If needle contains more than one character, only the first is used. This behavior is different from that of {@see strstr()}.

Return values

string

This function returns the portion of string, or FALSE if needle is not found.

Other resources

Official strrchr 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.