Lines Matching refs:code
757 public static function mb_chr($code, $encoding = null) argument
759 if (0x80 > $code %= 0x200000) {
760 $s = \chr($code);
761 } elseif (0x800 > $code) {
762 $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
763 } elseif (0x10000 > $code) {
764 $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
766 …$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(…
786 $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
787 if (0xF0 <= $code) {
788 … return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
790 if (0xE0 <= $code) {
791 return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
793 if (0xC0 <= $code) {
794 return (($code - 0xC0) << 6) + $s[2] - 0x80;
797 return $code;