**一.函数声明** ~~~ str_contains ( string $haystack , string $needle ) : bool ~~~ **二.函数使用** ~~~ $str="my name is php8"; var_dump(str_contains($str,'php8')); ~~~ **三.命名参数** ~~~ $str="my name is php8"; var_dump(str_contains(haystack:$str,needle:'php8')); var_dump(str_contains(needle:'php8',haystack:$str)); ~~~