📅  最后修改于: 2022-03-11 14:54:02.393000             🧑  作者: Mango
// this method is new with PHP 8 and above
$haystack = "Damn, I wonder if this string contains a comma.";
if (str_contains($haystack, ",")) {
echo "There is a comma!!";
}