3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $email = 'geradolson5656@gmail.com'; if (checkEmailAndDomain($email)) { echo 'Yes'; } else { echo 'No'; } function checkEmailAndDomain($email) { $exp = "/^(.*)@(.*)$/"; preg_match($exp, $email, $matches); if (!empty($matches[1]) and (!filter_var($email, FILTER_VALIDATE_EMAIL))) return (false); return (checkdnsrr(idn_to_ascii($matches[2]), 'MX')); }
based on m1pU3
Output for 7.2.0 - 7.2.8
Deprecated: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /in/Dl3dE on line 19 No
Output for 5.4.0 - 5.4.45, 5.6.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.20
No
Output for 5.5.0 - 5.5.38
Fatal error: Call to undefined function idn_to_ascii() in /in/Dl3dE on line 19
Process exited with code 255.