3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['submit'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "seedat8@gmail.com"; $email_subject = "Big Match Project"; 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['name']) || !isset($_POST['email']) || !isset($_POST['messages'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $email_from = $_POST['email']; // required $messages = $_POST['messages']; // required $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'The First Name you entered does not appear to be valid.<br />'; } if(strlen($messages) < 2) { $error_message .= 'The messages you entered do not appear to be valid.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "messages: ".clean_string($messages)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0120.00816.34
7.3.00.0110.01416.52
7.2.130.0090.01216.57
7.2.120.0190.00816.05
7.2.110.0110.00816.52
7.2.100.0100.01016.12
7.2.90.0130.00716.02
7.2.80.0180.00416.91
7.2.70.0060.01016.40
7.2.60.0160.00716.25
7.2.50.0130.00616.34
7.2.40.0170.00816.61
7.2.30.0060.01316.38
7.2.20.0150.00316.36
7.2.10.0090.00916.48
7.2.00.0120.00616.75
7.1.250.0240.00715.24
7.1.70.0030.00517.16
7.1.60.0060.00616.96
7.1.10.0030.06722.17
7.1.00.0370.05020.65
7.0.200.0070.01116.61
7.0.150.0270.04321.83
7.0.140.0330.05320.14
7.0.130.0070.05721.83
7.0.120.0130.05021.93
7.0.110.0130.06721.95
7.0.100.0100.06021.85
7.0.90.0230.06720.22
7.0.80.0230.06720.07
7.0.70.0430.04321.94
7.0.60.0100.05721.90
7.0.50.0330.08020.13
7.0.40.0100.06021.93
7.0.30.0270.06320.22
7.0.20.0130.06021.84
7.0.10.0130.05321.89
7.0.00.0170.04721.83

preferences:
27.2 ms | 401 KiB | 5 Q