3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $submit = true; $email =true; if($submit) { if(!$email) { $error = 'Please Enter Your Email'; } if ($error) { $result='<div class="alert alert-danger"><strong>There were error(s) in submitting the form: ' .$error. '</strong></div>'; } else { if(mail("colin.vrugteman@hotmail.com", "Newsletter Sign Up", "Email: ".$_POST['email'])) { $result='<div class="alert alert-success">Thank You. You have been signed up for our newsletter!</div>'; } } }
based on p4Qll
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Notice: Undefined variable: error in /in/ivfYq on line 12 Notice: Undefined index: email in /in/ivfYq on line 19 Warning: mail() has been disabled for security reasons in /in/ivfYq on line 19
Output for hhvm-3.15.4
Notice: Undefined variable: error in /in/ivfYq on line 12 Notice: Undefined index: email in /in/ivfYq on line 19