0x10FFFF) { throw new \OutOfRangeException( "Character code point value `$codePoint` is out of range", ); } } public static function of(string $string): self { if (mb_strlen($string) !== 1) { throw new \InvalidArgumentException( "Cannot instantiate Character of char `$string`, length is not equal to 1", ); } return new self( mb_ord($string), ); } public static function ofDecimal(int $decimal): self { return new self( $decimal, ); } public static function ofHexadecimal(string $hexadecimal): self { if (preg_match('#^U\+[0-9A-Fa-f]{4,}$#', $hexadecimal) !== 1) { throw new \InvalidArgumentException( "Invalid hexadecimal format `$hexadecimal`", ); } return new self( hexdec($hexadecimal), ); } public static function ofHtmlEntity(string $htmlEntity): self { return self::of( html_entity_decode( $htmlEntity, ENT_HTML5 | ENT_QUOTES | ENT_SUBSTITUTE, ), ); } public static function ofXmlEntity(string $xmlEntity): self { return self::of( html_entity_decode( $xmlEntity, ENT_XML1 | ENT_QUOTES | ENT_SUBSTITUTE, ), ); } public function __toString(): string { return mb_chr($this->codePoint); } public function toDecimal(): int { return $this->codePoint; } public function toHexadecimal(): string { return sprintf('U+%04X', $this->codePoint); } public function toHtmlEntity(): string { return htmlentities( strval($this), ENT_HTML5 | ENT_QUOTES | ENT_SUBSTITUTE, ); } public function toXmlEntity(): string { return '&#x' . dechex($this->codePoint) . ';'; } public function isCombining(): bool { // return $this->decimal >= 768 && $this->decimal <= 879; return preg_match('#\p{Mn}#u', strval($this)) === 1; } }__halt_compiler();----SIGNATURE:----cc2SXSShA7x+BKUQYsaMmRtnNGgRQg9pIhPGfl9LzlCHynD6CeOJW6XUsesizyUJb+yS2ZlJLgqKZhHHTHZP0cEYFZb+7W/3GK8Ovg8WXkipJ33q0sMcR0MNs0pSz1YB7Mu0WbfG8JlEZ8GAWGOjTEaEqATg7W14nIYsSWlBzb0KWo0X+ifE09aDBWr3CGDpw3q/Y8xennCwZZE9sEXsshfwboeNuR9B+p49OVO12/K+A1OUT/ZMUFxdBrVK52NWW+jAffOFBksdC5iA3JKnwX3HxEJ57o0UFnfSdMCwaNwV4liaUmIs9mZQ5lc000wwbCgpTc+Fkup7Xw1Ox/VlZrC482zx6FWT/OslvPchSwr8LmyJ+HzIEszzGZoJkwjqYUW5WDHB/BrK6OhsQpUa59nRNfof7cDNFnQugD6IEFe+ZsBTbwLLOGqTGM25fV6xt3K36CbZaDshgfApnhbr1gsSrOdYp+riwXQHgrpDeaVgNmqhrTsroC5lu0Sb8bQX6MJ5UZQG88hrpqZDgJSwAQnjde7tgzNIfw6GrFc0LIQOF1A6YBkW5/Vr14Wa1Ooxtz4xVEWgw3zN/qT38z+6ujBoz4IXBYUNffGcMBdMZcMZCVLRLg6dfD3rTCKTJwI2JPScoAGMuyMRZIhbbSdRO4rwnzUJwmywQ/ixHaa83dc=----ATTACHMENT:----MTQ1NDQ0MDQ3NTc5ODQ2NCA4ODg3MzAyNzMxMzU5MTQ5IDk1NDY3OTA2NTU1MDI1OTg=