3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "info@integralbuildingsolutions.com"; $email_subject = "Paid Boiler Prospect"; /* 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['interest']) || !isset($_POST['title']) || !isset($_POST['name']) || !isset($_POST['houseno']) || !isset($_POST['postcode']) || !isset($_POST['telephone']) || !isset($_POST['email']) || !isset($_POST['rating']) || !isset($_POST['calculate']) || !isset($_POST['pref'])) $interest = $_POST['interest']; // required $title = $_POST['title']; // required $name = $_POST['name']; // required $houseno = $_POST['houseno']; // required $postcode = $_POST['postcode']; // required $telephone = $_POST['telephone']; // required $email = $_POST['email']; // required $rating = $_POST['rating']; // required $calculate = $_POST['calculate']; // required $pref = $_POST['pref']; // 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)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name,$interest,$title)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } $string_var = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$interest)) { $error_message .= 'The Name you entered does not appear to be valid.<br />'; } if(strlen($houseno) < 1) { $error_message .= 'The house number you entered does not appear to be valid.<br />'; } if(strlen($telephone) < 2) { $error_message .= 'The telephone you entered do not appear to be valid.<br />'; } /* if(strlen($error_message) > 0) { $error_message .= 'There appears to be some errors please try to resubmit.<br />'; } */ $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 .= "Details: ".clean_string($interest)."\n"; $email_message .= "Title: ".clean_string($title)."\n"; $email_message .= "Name: ".clean_string($name)."\n"; $email_message .= "Houseno: ".clean_string($houseno)."\n"; $email_message .= "Postcode: ".clean_string($postcode)."\n"; $email_message .= "Tel No: ".clean_string($telephone)."\n"; $email_message .= "Email: ".clean_string($email)."\n"; $email_message .= "Energy rating: ".clean_string($rating)."\n"; $email_message .= "Shall We Calculate: ".clean_string($calculate)."\n"; $email_message .= "Boiler Preference: ".clean_string($pref)."\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); //Redirect after mail sent header('Location: http://www.solarkinguk.com/boiler-thank-you'); } ?>

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.4.00.0060.01214.78
7.3.120.0060.01214.51
7.3.110.0070.00714.83
7.3.100.0090.00914.84
7.3.90.0090.00014.71
7.3.80.0000.01114.96
7.3.70.0070.00714.80
7.3.60.0060.01214.86
7.3.50.0100.00314.88
7.3.40.0090.00614.74
7.3.30.0060.00914.57
7.3.20.0100.00316.56
7.3.10.0040.00416.64
7.3.00.0070.00716.25
7.2.250.0070.01114.84
7.2.240.0070.01115.16
7.2.230.0080.01215.18
7.2.220.0060.01215.07
7.2.210.0060.00615.22
7.2.200.0100.01015.00
7.2.190.0070.01315.21
7.2.180.0000.01514.96
7.2.170.0070.01015.01
7.2.00.0110.00619.48
7.1.330.0170.00015.58
7.1.320.0160.00015.63
7.1.310.0030.00915.91
7.1.300.0130.00615.67
7.1.290.0030.01015.71
7.1.280.0030.00615.64
7.1.270.0060.00315.61
7.1.260.0000.01415.86
7.1.100.0030.00917.98
7.1.70.0070.00316.72
7.1.60.0080.00417.19
7.1.50.0100.01316.50
7.1.00.0000.07322.45
7.0.200.0000.01516.75
7.0.140.0100.07022.22
7.0.60.0130.07320.04
7.0.50.0030.06717.86
7.0.40.0000.05020.16
7.0.30.0370.06720.19
7.0.20.0400.07020.02
7.0.10.0100.04020.20
7.0.00.0030.08720.33
5.6.280.0070.07021.18
5.6.210.0070.08720.59
5.6.200.0100.08018.14
5.6.190.0130.08020.39
5.6.180.0330.04020.52
5.6.170.0330.04020.45
5.6.160.0130.03720.56
5.6.150.0030.06018.14
5.6.140.0070.04318.25
5.6.130.0000.05018.17
5.6.120.0030.04320.85
5.6.110.0100.03721.15
5.6.100.0070.04321.02
5.6.90.0070.07321.04
5.6.80.0130.07020.56
5.5.350.0270.07320.40
5.5.340.0070.04318.01
5.5.330.0130.03720.47
5.5.320.0000.08320.27
5.5.310.0200.03720.30
5.5.300.0070.04017.96
5.5.290.0100.07317.95
5.5.280.0130.08720.67
5.5.270.0170.08320.91
5.5.260.0070.08320.86
5.5.250.0000.04320.71
5.5.240.0200.07320.30
5.4.450.0300.03719.49
5.4.440.0730.09019.55
5.4.430.0070.02719.64
5.4.420.0700.02719.54
5.4.410.0470.03719.32
5.4.400.1000.03319.05
5.4.390.0470.04019.02
5.4.380.0400.05018.51
5.4.370.0270.05318.73
5.4.360.0270.05718.49
5.4.350.0300.06018.58
5.4.340.0330.05318.75
5.4.320.0050.03812.52
5.4.310.0070.03612.52
5.4.300.0060.03512.53
5.4.290.0070.03612.52
5.4.280.0050.03612.41
5.4.270.0060.04512.41
5.4.260.0090.05112.41
5.4.250.0070.06018.95
5.4.240.0130.05018.95
5.4.230.0100.05018.95
5.4.220.0100.05318.80
5.4.210.0070.05319.09
5.4.200.0130.04719.00
5.4.190.0070.06318.98
5.4.180.0130.05318.82
5.4.170.0130.06718.97
5.4.160.0030.05318.78
5.4.150.0100.07719.07
5.4.140.0170.04016.55
5.4.130.0170.05016.40
5.4.120.0170.06016.41
5.4.110.0070.06716.50
5.4.100.0070.05016.44
5.4.90.0070.05016.37
5.4.80.0030.05016.60
5.4.70.0170.03716.60
5.4.60.0170.04316.40
5.4.50.0130.04716.49
5.4.40.0100.04716.41
5.4.30.0130.05716.38
5.4.20.0070.05016.50
5.4.10.0170.05716.30
5.4.00.0100.06715.86
5.3.290.0080.03712.80
5.3.280.0170.04014.71
5.3.270.0030.05714.64
5.3.260.0030.05714.71
5.3.250.0170.04314.71
5.3.240.0170.04314.85
5.3.230.0070.05014.61
5.3.220.0170.04314.76
5.3.210.0070.05314.68
5.3.200.0130.04314.76
5.3.190.0100.07714.50
5.3.180.0030.05714.59
5.3.170.0130.05714.61
5.3.160.0170.04014.58
5.3.150.0070.05014.58
5.3.140.0070.05014.67
5.3.130.0100.05014.59
5.3.120.0100.05014.41
5.3.110.0070.05314.80
5.3.100.0230.05314.14
5.3.90.0100.04714.03
5.3.80.0100.04714.02
5.3.70.0000.05714.26
5.3.60.0000.05713.93
5.3.50.0070.05714.14
5.3.40.0070.04714.04
5.3.30.0170.05314.00
5.3.20.0130.04313.79
5.3.10.0100.04713.58
5.3.00.0030.05013.68
5.2.170.0030.04311.13
5.2.160.0170.04311.34
5.2.150.0070.04011.39
5.2.140.0000.04711.16
5.2.130.0070.04011.15
5.2.120.0000.04311.04
5.2.110.0000.04311.22
5.2.100.0030.04011.21
5.2.90.0070.05311.20
5.2.80.0100.05311.21
5.2.70.0030.04311.09
5.2.60.0100.03711.04
5.2.50.0070.03711.23
5.2.40.0100.03711.10
5.2.30.0030.04310.83
5.2.20.0070.04311.06
5.2.10.0030.03710.88
5.2.00.0070.03710.82
5.1.60.0070.0309.87
5.1.50.0100.02710.04
5.1.40.0000.0539.85
5.1.30.0030.03710.45
5.1.20.0000.04010.47
5.1.10.0000.04010.15
5.1.00.0100.04310.07
5.0.50.0000.0338.62
5.0.40.0030.0278.53
5.0.30.0000.0608.48
5.0.20.0170.0238.24
5.0.10.0030.0278.43
5.0.00.0000.0438.28
4.4.90.0100.0177.22
4.4.80.0000.0237.22
4.4.70.0070.0177.22
4.4.60.0000.0237.22
4.4.50.0030.0207.22
4.4.40.0000.0377.22
4.4.30.0070.0177.22
4.4.20.0000.0307.22
4.4.10.0070.0177.22
4.4.00.0100.0377.18
4.3.110.0030.0307.18
4.3.100.0000.0237.18
4.3.90.0030.0207.18
4.3.80.0030.0407.18
4.3.70.0000.0207.18
4.3.60.0000.0237.18
4.3.50.0030.0207.18
4.3.40.0000.0337.18
4.3.30.0000.0237.18
4.3.20.0000.0237.18
4.3.10.0030.0207.18
4.3.00.0130.01314.52

preferences:
31.08 ms | 401 KiB | 5 Q