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>
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected end of file in /in/J1Ofm on line 37
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.25
Parse error: syntax error, unexpected $end in /in/J1Ofm on line 37
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected $ in /in/J1Ofm on line 37
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/J1Ofm on line 37
Process exited with code 255.