3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $to = "you@yourdomain.com"; $subject = "Your email subject line"; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted. "; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; echo "Please go back and fix these errors.<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['first_name']) || !isset($_POST['last_name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); }
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected end of file in /in/nnoXp on line 25
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected $end in /in/nnoXp on line 25
Process exited with code 255.