Problem Statement
Which new PHP 8 function checks if a string contains another substring?
Explanation
The str_contains function returns true if one string is found within another. It replaces the need for using strpos with manual comparison.
Code Solution
SolutionRead Only
str_contains('Hello World','World');