PHP 判断字符串 是否 包含另一个字符串

1.stristr 忽略大小写

$string = 'Hello World!';
if(stristr($string, 'earth') === FALSE) {
echo '"earth" not found in string<br />';
}// 输出: "earth" not found in string
echo stristr($string, 'lo');  //输出 lo World!