run code in 300+ PHP versions simultaneously
<?php $emails = array( 'test@example.com', 'test.derp@example.com', 'test+nick@example.com', 'abc."defghi".xyz@example.com', '"abcdefghixyz"@example.com', 'jsmith@[]', 'jsmith@[IPv6:2001:db8::1]', 'long.but.still.perfectly.valid.email.address@on.even.longer.domain.name.owned.by.some.weird.name.company.which.name.you.cannot.pronounce.com', 'other.email-with-dash@example.com', '"much.more unusual"@example.com', '"very.unusual.@.unusual.com"@example.com', '"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com', 'admin@mailserver1 (local domain name with no TLD)', '#!$%&\'*+-/=?^_`{}|~@example.org', '"()<>[]:,;@\\\"!#$%&\'*+-/=?^_`{}| ~.a"@example.org', '" "@example.org (space between the quotes)', '☃☃☃@example.com (Unicode characters in local part)', '☃☃☃@☃☃☃.com (Unicode characters in domain part)', 'new@domain.pizza' ); foreach ($emails as $email) { echo (filter_var($email, FILTER_VALIDATE_EMAIL)) ? "[+] Email $email is valid\n" : "[-] Email $email is NOT valid\n"; }
Output for git.master, git.master_jit
[+] Email test@example.com is valid [+] Email test.derp@example.com is valid [+] Email test+nick@example.com is valid [+] Email abc."defghi".xyz@example.com is valid [+] Email "abcdefghixyz"@example.com is valid [+] Email jsmith@[] is valid [+] Email jsmith@[IPv6:2001:db8::1] is valid [+] Email long.but.still.perfectly.valid.email.address@on.even.longer.domain.name.owned.by.some.weird.name.company.which.name.you.cannot.pronounce.com is valid [+] Email other.email-with-dash@example.com is valid [-] Email "much.more unusual"@example.com is NOT valid [+] Email "very.unusual.@.unusual.com"@example.com is valid [+] Email "very.(),:;<>[]\".VERY.\"very@\ \"very\".unusual"@strange.example.com is valid [-] Email admin@mailserver1 (local domain name with no TLD) is NOT valid [+] Email #!$%&'*+-/=?^_`{}|~@example.org is valid [-] Email "()<>[]:,;@\\"!#$%&'*+-/=?^_`{}| ~.a"@example.org is NOT valid [-] Email " "@example.org (space between the quotes) is NOT valid [-] Email ☃☃☃@example.com (Unicode characters in local part) is NOT valid [-] Email ☃☃☃@☃☃☃.com (Unicode characters in domain part) is NOT valid [+] Email new@domain.pizza is valid

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

11.55 ms | 408 KiB | 5 Q