3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(isset($_POST['submit'])) { $name= $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; $to = "YOUR EMAIL HERE"; $subject = "Message from $email"; $message = "$comments \n Name: $name \n Email: $email \n"; if ($name) { if($email) { if($comments) { mail ($to, $subject, $message); } } } } else { ?> <form action="contact.php" method="POST"> Name:<br /> <input type="text" name="name" /><br /><br /> Email:<br /> <input type="text" name="email" /><br /><br /> Comments:<br /> <textarea cols="5" rows="10" name="comments"></textarea><br /><br /> <input type="submit" value="Send Message" name="submit" /> </form> <?php ?>
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected end of file in /in/0pMiJ on line 42
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected $end in /in/7co6L on line 41
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected $end in /in/0pMiJ on line 42
Process exited with code 255.