3v4l.org

run code in 200+ php & hhvm versions
<?php $value = str_repeat('a.', 126) . 'aaaa'; // 256 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 dat2m
Output for 5.5.0 - 7.2.6
bool(false) array(0) { }