Partial intl implementation in pure PHP.

Implemented:

  • idn_to_ascii - Convert domain name to IDNA ASCII form
  • idn_to_utf8 - Convert domain name from IDNA ASCII to Unicode
CloneableFinalInstantiable
Constants
public Symfony\Polyfill\Intl\Idn\Idn::INTL_IDNA_VARIANT_2003 = 0
public Symfony\Polyfill\Intl\Idn\Idn::INTL_IDNA_VARIANT_UTS46 = 1
Methods
public static idn_to_ascii( $domain, $options, $variant, $idna_info = [])
public static idn_to_utf8( $domain, $options, $variant, $idna_info = [])
Properties
private static $decodeTable = ['a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, 'y' => 24, 'z' => 25, 0 => 26, 1 => 27, 2 => 28, 3 => 29, 4 => 30, 5 => 31, 6 => 32, 7 => 33, 8 => 34, 9 => 35]
private static $encodeTable = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
Methods
private static adapt( $delta, $numPoints, $firstTime)
private static calculateThreshold( $k, $bias)
private static decodePart( $input)
private static encodePart( $input)
private static listCodePoints( $input)
Properties
private static $decodeTable = ['a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, 'y' => 24, 'z' => 25, 0 => 26, 1 => 27, 2 => 28, 3 => 29, 4 => 30, 5 => 31, 6 => 32, 7 => 33, 8 => 34, 9 => 35]
private static $encodeTable = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
Methods
private static adapt( $delta, $numPoints, $firstTime)
private static calculateThreshold( $k, $bias)
private static decodePart( $input)
private static encodePart( $input)
public static idn_to_ascii( $domain, $options, $variant, $idna_info = [])
public static idn_to_utf8( $domain, $options, $variant, $idna_info = [])
private static listCodePoints( $input)
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only