3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump($r = idn_to_ascii( 'foo.faß.de', IDNA_USE_STD3_RULES | IDNA_NONTRANSITIONAL_TO_ASCII | IDNA_CHECK_CONTEXTJ, INTL_IDNA_VARIANT_UTS46, $info )); var_dump($info); var_dump(idn_to_utf8( $r, IDNA_USE_STD3_RULES | IDNA_NONTRANSITIONAL_TO_UNICODE | IDNA_CHECK_CONTEXTJ, INTL_IDNA_VARIANT_UTS46, $info )); var_dump($info);
based on NEp2f
Output for 5.4.11 - 5.4.45, 5.6.0 - 7.3.0
string(17) "foo.xn--fa-hia.de" array(3) { ["result"]=> string(17) "foo.xn--fa-hia.de" ["isTransitionalDifferent"]=> bool(true) ["errors"]=> int(0) } string(11) "foo.faß.de" array(3) { ["result"]=> string(11) "foo.faß.de" ["isTransitionalDifferent"]=> bool(false) ["errors"]=> int(0) }
Output for 5.3.21 - 5.3.29, 5.5.0 - 5.5.38
Fatal error: Call to undefined function idn_to_ascii() in /in/oWAqA on line 3
Process exited with code 255.