3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach (array( 'localpart.ending.with.dot.@example.com', '(comment)localpart@example.com', '"this is v@lid!"@example.com', '"much.more unusual"@example.com', 'postbox@com', 'admin@mailserver1', '"()<>[]:,;@\\"\\\\!#$%&\'*+-/=?^_`{}| ~.a"@example.org', '" "@example.org', ) as $address) { echo "<p>$address is <b>".(filter_var($address, FILTER_VALIDATE_EMAIL) ? '' : 'not')." valid</b></p>\n"; } ?>
Output for 5.2.14 - 5.2.17, 5.3.3 - 7.1.0
<p>localpart.ending.with.dot.@example.com is <b>not valid</b></p> <p>(comment)localpart@example.com is <b>not valid</b></p> <p>"this is v@lid!"@example.com is <b>not valid</b></p> <p>"much.more unusual"@example.com is <b>not valid</b></p> <p>postbox@com is <b>not valid</b></p> <p>admin@mailserver1 is <b>not valid</b></p> <p>"()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org is <b>not valid</b></p> <p>" "@example.org is <b>not valid</b></p>
Output for 5.2.11 - 5.2.13, 5.3.1 - 5.3.2
<p>localpart.ending.with.dot.@example.com is <b> valid</b></p> <p>(comment)localpart@example.com is <b>not valid</b></p> <p>"this is v@lid!"@example.com is <b> valid</b></p> <p>"much.more unusual"@example.com is <b> valid</b></p> <p>postbox@com is <b> valid</b></p> <p>admin@mailserver1 is <b>not valid</b></p> <p>"()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org is <b>not valid</b></p> <p>" "@example.org is <b> valid</b></p>
Output for 5.2.9 - 5.2.10, 5.3.0
<p>localpart.ending.with.dot.@example.com is <b> valid</b></p> <p>(comment)localpart@example.com is <b>not valid</b></p> <p>"this is v@lid!"@example.com is <b> valid</b></p> <p>"much.more unusual"@example.com is <b> valid</b></p> <p>postbox@com is <b> valid</b></p> <p>admin@mailserver1 is <b> valid</b></p> <p>"()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org is <b>not valid</b></p> <p>" "@example.org is <b> valid</b></p>
Output for 5.2.1 - 5.2.8
<p>localpart.ending.with.dot.@example.com is <b>not valid</b></p> <p>(comment)localpart@example.com is <b>not valid</b></p> <p>"this is v@lid!"@example.com is <b> valid</b></p> <p>"much.more unusual"@example.com is <b> valid</b></p> <p>postbox@com is <b>not valid</b></p> <p>admin@mailserver1 is <b>not valid</b></p> <p>"()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org is <b>not valid</b></p> <p>" "@example.org is <b> valid</b></p>
Output for 5.2.0
<p>localpart.ending.with.dot.@example.com is <b>not valid</b></p> <p>(comment)localpart@example.com is <b>not valid</b></p> <p>"this is v@lid!"@example.com is <b>not valid</b></p> <p>"much.more unusual"@example.com is <b> valid</b></p> <p>postbox@com is <b>not valid</b></p> <p>admin@mailserver1 is <b>not valid</b></p> <p>"()<>[]:,;@\"\\!#$%&'*+-/=?^_`{}| ~.a"@example.org is <b>not valid</b></p> <p>" "@example.org is <b> valid</b></p>
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function filter_var() in /in/DfSCq on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: filter_var() in /in/DfSCq on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: filter_var() in /in/DfSCq on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: filter_var() in /in/DfSCq on line 12