📅  最后修改于: 2022-03-11 14:53:55.495000             🧑  作者: Mango
//By far the most accurate: VIA https://stackoverflow.com/a/25633879/7596555
function containsWord($str, $word)
{
return !!preg_match('#\\b' . preg_quote($word, '#') . '\\b#i', $str);
}