str_contains
PHP 8
str_contains - Determine if a string contains a given substring
str_contains(
string$haystack,
string$needle ): bool
Performs a case-sensitive check indicating if needle is contained in haystack.
Parameters
- haystack
-
The string to search in.
- needle
-
The substring to search for in the haystack.
Return Values
Returns true if needle is in haystack, false otherwise.
Notes
Note:
This function is binary-safe.