3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = str_repeat('a.', 126) . 'aaa'; // 255 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

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
178.57 ms | 3093 KiB | 12 Q