3v4l.org

run code in 300+ PHP versions simultaneously
<?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')); }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $_email in /in/m1pU3 on line 14 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/m1pU3 on line 14 Warning: Undefined array key 2 in /in/m1pU3 on line 19 Deprecated: idn_to_ascii(): Passing null to parameter #1 ($domain) of type string is deprecated in /in/m1pU3 on line 19 Fatal error: Uncaught ValueError: checkdnsrr(): Argument #1 ($hostname) cannot be empty in /in/m1pU3:19 Stack trace: #0 /in/m1pU3(19): checkdnsrr('', 'MX') #1 /in/m1pU3(5): checkEmailAndDomain('geradolson5656@...') #2 {main} thrown in /in/m1pU3 on line 19
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.52 ms | 402 KiB | 8 Q