function get_words($sentence, $count = 30) {
preg_match("/(?:w+(?:W+|$)){0,$count}/", $sentence, $matches);
return $matches[0];
};
$sentence = "Gryphon interrupted in a low voice. 'Not at all,' said the Dodo, pointing to the confused clamour of the wood--(she considered him to you, Though.Gryphon interrupted in a low voice. 'Not at all,' said the Dodo, pointing to the confused clamour of the wood--(she considered him to you, Though.Gryphon interrupted in a low voice. 'Not at all,' said the Dodo, pointing to the confused clamour of the wood--(she considered him to you, Though.";
$cropSentence = get_words($sentence);
$finalSentence= substr($cropSentence, 0, strrpos($cropSentence, "."));
echo $finalSentence;
它将返回到最后一次出现(.);
鹰头狮低声打断了他的话“一点也不,”渡渡鸟说,
指着树林里杂乱的喧闹声——(她认为他是
但是你