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:----lOSwaVNLqHwTW4BzStxfM+H/KEmqMC5DcMQxI+qjueAY88xjg+wkFsi5LDBNBq4vf/ipBGFDqmHelpc3ScxgJF87EVpfB4OZNaCqrb6pezpRm1fC2wvmMoT+gWyiuNDe6otrQ30UoYT9T8NW1I7LWZupDvUBa/XWOApjrTV7BDfylZgnxLpMesL7+iHEzOlbADLCQAO+r7fxwXlXI1LSwfktf7lI3T81/n7jgM38pcuKXdCqEVggVpGWBBJWU3LLxk8JiSRl9J16EsPm9Qqv/jpBcUc2hBo9Qm2hLtq1FP+Cf5tvNeP66f0eiffo+FpGnBnI7A1pxT0rUGgbHjhs/p9kCRpC+PxDRj4IokM1KO9NuUDpWwWx/KOJGkjp4xjzOqYWuLdZg9crOqzMZ+fJ6kp1LTD6QiV/nf0kbPcz3engGTLAD4TqOKR8IiQNrcQqDBqNeho26v9i3Xeg3tKz/tuLZfVXBlia9q/csP50IwsKJPSKKczuf1oMfs/fBgQDClaEwsl/IypLeTDLEiTR4cSmo/GDtn4yHlJXL5gflGKTiPATnLepa8yRcwiJy7wZfkN9mS6zDJSIoZ1TsnAxaVddWen6EYZZ7m2NS5aM36VuxSjZlwDS930KIZ1BUxxU4NaTLkpxbRHxPjukNxLGYEvhjLYQf5+AzpF4OgJ49+I=----ATTACHMENT:----NjAyNjIzODA2MDQzNjcxNyA5OTM3MzA0MDM4MDM0ODY3IDI1ODMyNjk4NTI0MTQ0MTg=