check if is in a string php

PHP
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
    echo "My string contains Bob";
}// returns true if $needle is a substring of $haystack
function contains($haystack, $needle){
    return strpos($haystack, $needle) !== false;
}
Source

Also in PHP: