3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $email = "ceo@example.com"; $domain = explode("@",$email); $valid = checkdnsrr($domain[1], "ANY"); if($valid) echo "The domain has an MX record!"; else echo "Cannot locate MX record for $domain[1]!"; ?>
based on QRrkh
Output for 4.3.0 - 7.2.0
Cannot locate MX record for example.com!