public static function chr($cp)
	{
		if (! ReflectionTypeHint::isValid()) return false;
		if (is_null($cp)) return $cp;

		static $cache = array();
		if (array_key_exists($cp, $cache)) return $cache[$cp]; #speed improve

		if ($cp <= 0x7f)     return $cache[$cp] = chr($cp);
		if ($cp <= 0x7ff)    return $cache[$cp] = chr(0xc0 | ($cp >> 6))  .
												  chr(0x80 | ($cp & 0x3f));
		if ($cp <= 0xffff)   return $cache[$cp] = chr(0xe0 | ($cp >> 12)) .
												  chr(0x80 | (($cp >> 6) & 0x3f)) .
												  chr(0x80 | ($cp & 0x3f));
		if ($cp <= 0x10ffff) return $cache[$cp] = chr(0xf0 | ($cp >> 18)) .
												  chr(0x80 | (($cp >> 12) & 0x3f)) .
												  chr(0x80 | (($cp >> 6) & 0x3f)) .
												  chr(0x80 | ($cp & 0x3f));
		#U+FFFD REPLACEMENT CHARACTER
		return $cache[$cp] = "\xEF\xBF\xBD";
	}
public static function chr($cp)
	{
		if (! ReflectionTypeHint::isValid()) return false;
		if (is_null($cp)) return $cp;

		static $cache = array();
		if (array_key_exists($cp, $cache)) return $cache[$cp]; #speed improve

		if ($cp <= 0x7f)     return $cache[$cp] = chr($cp);
		if ($cp <= 0x7ff)    return $cache[$cp] = chr(0xc0 | ($cp >> 6))  .
												  chr(0x80 | ($cp & 0x3f));
		if ($cp <= 0xffff)   return $cache[$cp] = chr(0xe0 | ($cp >> 12)) .
												  chr(0x80 | (($cp >> 6) & 0x3f)) .
												  chr(0x80 | ($cp & 0x3f));
		if ($cp <= 0x10ffff) return $cache[$cp] = chr(0xf0 | ($cp >> 18)) .
												  chr(0x80 | (($cp >> 12) & 0x3f)) .
												  chr(0x80 | (($cp >> 6) & 0x3f)) .
												  chr(0x80 | ($cp & 0x3f));
		#U+FFFD REPLACEMENT CHARACTER
		return $cache[$cp] = "\xEF\xBF\xBD";
	}
public static function chr ( $ cp ) { if ( ! ReflectionTypeHint :: isValid ( ) ) return false ; if ( is_null ( $ cp ) ) return $ cp ; static $ cache = array ( ) ; if ( array_key_exists ( $ cp , $ cache ) ) return $ cache [ $ cp ] ; #speed improve
 if ( $ cp <= 0x7f ) return $ cache [ $ cp ] = chr ( $ cp ) ; if ( $ cp <= 0x7ff ) return $ cache [ $ cp ] = chr ( 0xc0 | ( $ cp >> 6 ) ) . chr ( 0x80 | ( $ cp & 0x3f ) ) ; if ( $ cp <= 0xffff ) return $ cache [ $ cp ] = chr ( 0xe0 | ( $ cp >> 12 ) ) . chr ( 0x80 | ( ( $ cp >> 6 ) & 0x3f ) ) . chr ( 0x80 | ( $ cp & 0x3f ) ) ; if ( $ cp <= 0x10ffff ) return $ cache [ $ cp ] = chr ( 0xf0 | ( $ cp >> 18 ) ) . chr ( 0x80 | ( ( $ cp >> 12 ) & 0x3f ) ) . chr ( 0x80 | ( ( $ cp >> 6 ) & 0x3f ) ) . chr ( 0x80 | ( $ cp & 0x3f ) ) ; #U+FFFD REPLACEMENT CHARACTER
 return $ cache [ $ cp ] = "\xEF\xBF\xBD" ; }
Converts a UNICODE codepoint to a UTF-8 character

@param   int|digit|null  $cp  Unicode codepoint
@return  string|bool|null     UTF-8 character
Returns FALSE if error occurred
Converts a UNICODE codepoint to a UTF - 8 character