3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $email = "edusegzy2@gmail.com"; $domain = explode("google.com",$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 FEm1h
Output for 5.3.0 - 7.2.0
Notice: Undefined offset: 1 in /in/G6QDr on line 5 Warning: checkdnsrr(): Host cannot be empty in /in/G6QDr on line 5 Notice: Undefined offset: 1 in /in/G6QDr on line 8 Cannot locate MX record for !
Output for 5.2.3 - 5.2.17
Notice: Undefined offset: 1 in /in/G6QDr on line 5 Warning: checkdnsrr(): Host and type cannot be empty in /in/G6QDr on line 5 Notice: Undefined offset: 1 in /in/G6QDr on line 8 Cannot locate MX record for !
Output for 4.3.0 - 5.2.2
Notice: Undefined offset: 1 in /in/G6QDr on line 5 Notice: Undefined index: 1 in /in/G6QDr on line 8 Cannot locate MX record for !