3v4l.org

run code in 200+ php & hhvm versions
<?php $value = str_repeat('ф.', 31) . 's.s.s.s'; // "ф" is cyrillic symbol, only 38 characters, but after conversion to ASCII will be much more $result = idn_to_ascii($value, 0, INTL_IDNA_VARIANT_UTS46, $idnaInfo); var_dump($result); var_dump($idnaInfo); // $idnaInfo['errors'] should be equal to 4, it is value of IDNA_ERROR_DOMAIN_NAME_TOO_LONG
based on tuM9l
Output for 5.6.25 - 5.6.30, 7.0.10 - 7.3.1
bool(false) array(0) { }
Output for 5.4.0 - 5.4.45, 5.6.0 - 5.6.24, 7.0.0 - 7.0.9
Fatal error: idn_to_ascii(): ICU returned an unexpected length in /in/EUSlJ on line 4
Process exited with code 255.
Output for hhvm-3.15.4 - 3.17.3
bool(false) array(3) { ["result"]=> string(255) "xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.xn--t1a.s.s.s.s" ["isTransitionalDifferent"]=> bool(false) ["errors"]=> int(4) }
Output for hhvm-3.10.1 - 3.13.2
bool(false) NULL
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.3.29, 5.5.0 - 5.5.38
Fatal error: Call to undefined function idn_to_ascii() in /in/EUSlJ on line 4
Process exited with code 255.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/EUSlJ on line 7
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: idn_to_ascii() in /in/EUSlJ on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: idn_to_ascii() in /in/EUSlJ on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: idn_to_ascii() in /in/EUSlJ on line 4