ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**一.函数声明** ``` 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)); ```   **配套的PHP8新特性详解视频教程,请查看以下专辑** 链接:[https://www.ixigua.com/6937490165329822219](https://www.ixigua.com/6937490165329822219)