阅读量:0
是的,stripos函数可以忽略大小写进行检索。可以在函数的第三个参数中传入常量值STR_CASE_INSENSITIVE来实现忽略大小写的检索。示例代码如下:
$string = 'Hello, World!'; $pos = stripos($string, 'hello', 0, STR_CASE_INSENSITIVE); if ($pos !== false) { echo 'The word "hello" is found in the string.'; } else { echo 'The word "hello" is not found in the string.'; }