__construct() __construct(string $encoding = 'UTF-8') Constructor Parameters string $encoding Character encoding
encode() encode(string $input) : string Encode a domain to its Punycode version Parameters string $input Domain name in Unicode to be encoded Returns string — Punycode representation in ASCII
decode() decode(string $input) : string Decode a Punycode domain name to its Unicode counterpart Parameters string $input Domain name in Punycode Returns string — Unicode domain name
encodePart() encodePart(string $input) : string Encode a part of a domain name, such as tld, to its Punycode version Parameters string $input Part of a domain name Returns string — Punycode representation of a domain part
decodePart() decodePart(string $input) : string Decode a part of domain name, such as tld Parameters string $input Part of a domain name Returns string — Unicode domain part
calculateThreshold() calculateThreshold(integer $k, integer $bias) : integer Calculate the bias threshold to fall between TMIN and TMAX Parameters integer $k integer $bias Returns integer
adapt() adapt(integer $delta, integer $numPoints, boolean $firstTime) : integer Bias adaptation Parameters integer $delta integer $numPoints boolean $firstTime Returns integer
listCodePoints() listCodePoints(string $input) : array List code points for a given input Parameters string $input Returns array — Multi-dimension array with basic, non-basic and aggregated code points
charToCodePoint() charToCodePoint(string $char) : integer Convert a single or multi-byte character to its code point Parameters string $char Returns integer
codePointToChar() codePointToChar(integer $code) : string Convert a code point to its single or multi-byte character Parameters integer $code Returns string