str_ends_with
str_ends_with ( $haystack, $needle )
Parameters:- (string) haystack The string to search in.
- (string) needle The substring to search for in the `$haystack`.
Returns:- (bool) True if `$haystack` ends with `$needle`, otherwise false.
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Polyfill for `str_ends_with()` function added in PHP 8.0.Performs a case-sensitive check indicating if
the haystack ends with needle.