Lines Matching refs:code
173 public static function mb_chr($code, $encoding = null) argument
175 if (0x80 > $code %= 0x200000) {
176 $s = \chr($code);
177 } elseif (0x800 > $code) {
178 $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F);
179 } elseif (0x10000 > $code) {
180 $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F);
182 …$s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(…
204 $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
205 if (0xF0 <= $code) {
206 … return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80;
208 if (0xE0 <= $code) {
209 return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80;
211 if (0xC0 <= $code) {
212 return (($code - 0xC0) << 6) + $s[2] - 0x80;
215 return $code;