function isSentencePalindrome($str) {
// Change the string into lowercase and remove all non-alphanumeric characters
$str = strtolower(preg_replace('/[^a-zA-Z0-9]/', '', $str));
return $str === strrev($str);
}
echo isSentencePalindrome("Top step's pup's pet spot.") ? "yes" : "no";
/*
run:
yes
*/