\s*\s*<\/p>/', '', $html) ?? $html; return trim($html); } public static function isHtml(string $text): bool { return $text !== strip_tags($text); } }