3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'johnsnow@ヒキワリ.ナットウ.ニホン'; //$email = idn_to_ascii($email); $email = str_replace('xn--', '', $email); echo $email; //echo "\n"; //$email = 'johnsnow@zoosk.com'; //$email = idn_to_ascii($email); //$email = str_replace('xn--', '', $email); //echo $email; ?>

preferences:
33.28 ms | 402 KiB | 5 Q