3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'johnsnow@ヒキワリ.ナットウ.com'; $email = str_replace(array('xn--', '@-'), array('','@'), idn_to_ascii($email)); echo $email;

preferences:
37.08 ms | 402 KiB | 5 Q