3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $email = ""; if (!$email) { $errorMessage .= "<div class=\"error\">You must enter an e-mail address!</div>"; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $errorMessage .= "<div class=\"error\">You must enter a valid e-mail!</div>"; } echo $errorMessage; ?>
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: errorMessage in /in/RqMsi on line 6 <div class="error">You must enter an e-mail address!</div>
Output for hhvm-3.10.0 - 3.12.0
<div class="error">You must enter an e-mail address!</div>
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: errorMessage in /in/RqMsi on line 6 <div class="error">You must enter an e-mail address!</div>