$chars = [];$length = mb_strlen($text);$position = 0;$unicodePattern = "/[\xc2-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xff][\x80-\xbf]{3}/";$chinese_chars_positions = [];while ($position < $length) {$char = mb_substr($text, $position, 1);$chars[] = $char;if (preg_match($unicodePattern, $char) &&!preg_match("/[a-z0-9\\s]/i", $char) &&mb_strlen($char) <= 3 &&!in_array($char, ["'", "\\\"", "`", ",", "(", ")", "%", "=", "-", "*", "^", "@", "!", "{", "}", "[", "]", ":", ";", "|", "\\", "/", "?", "<", ">", ".", ",", ",", "。", "!", "《", "》", "”", "“"])) {$chinese_chars_positions[] = $position;}$position++;}