3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $email_a = 'a"b(c)d,e:f;g<h>i[j\k]l@example.com'; $email_b = "!#$%&'*+-/=?^_`{}|~@example.org"; if (filter_var($email_a, FILTER_VALIDATE_EMAIL)) { echo "This ($email_a) email address is considered valid.<br />"; } else { echo "Invalid!<br />"; } if (filter_var($email_b, FILTER_VALIDATE_EMAIL)) { echo "This ($email_b) email address is considered valid."; } else { echo "Invalid!"; }
Output for 5.2.14 - 5.2.17, 5.3.3 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Invalid!<br />This (!#$%&'*+-/=?^_`{}|~@example.org) email address is considered valid.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0 - 5.2.13, 5.3.0 - 5.3.2
Invalid!<br />Invalid!
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function filter_var() in /in/UAeDO on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: filter_var() in /in/UAeDO on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: filter_var() in /in/UAeDO on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: filter_var() in /in/UAeDO on line 6