3v4l.org

run code in 200+ php & hhvm versions
<?php $value = str_repeat('a.', 126) . 'aa'; // 254 characters, max allowed is 253, trailing dot ignored $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 aJ6n3
Output for 5.6.0 - 5.6.38, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.2
bool(false) array(3) { ["result"]=> string(254) "a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.a.aa" ["isTransitionalDifferent"]=> bool(false) ["errors"]=> int(4) }
Output for hhvm-3.12.14 - 3.13.2
bool(false) NULL
Output for 5.5.0 - 5.5.38
Fatal error: Call to undefined function idn_to_ascii() in /in/CijFV on line 4
Process exited with code 255.