This method is case sensitive. The need can be an array with multiple chars or words who
are going to look up in the haystack string.
If an array of needle words is provided the $strict parameter defines whether all need keys must be found
in the string to get the true response or if just one of the keys are found the response is already true.
public static contains ( string | array $needle, string $haystack, boolean $strict = false ) : boolean | ||
$needle | string | array | The char or word to find in the $haystack. Can be an array to multi find words or char in the string. |
$haystack | string | The haystack where the $needle string should be looked up. |
$strict | boolean | If an array of needles is provided the $strict parameter defines whether all keys must be found ($strict = true) or just one result must be found ($strict = false). |
return | boolean | If an array of values is provided the response may change depending on $findAll |