//str_contains ( string $haystack , string $needle ) : bool if (str_contains('Foo Bar Baz', 'Foo')) { echo 'Found'; }