3v4l.org

run code in 300+ PHP versions simultaneously
<?php //create short variable names $phonee=$_POST['Phone']; $nn="[a-zA-Z]"; $honda=1; $name = check_input($_POST['FirstName']); //run check_input function all all incoming data $fromEmail = check_input($_POST['Email']); $toaddress = "kcambridge@est-static.com"; //INITIAL VALIDATION //Function checks input and strips potential dangerous characters so injection code cannot be //interpereted correctly function check_input($data) { $data = trim($data); // strips any quotes escaped with slashes $data = stripslashes($data); //strips slashes $data = htmlspecialchars($data); //replaces HTML characters like > with HTML version &lt; return $data; } function isEmailValid($fromEmail) { $pattern = "^[_a-z0-9.-]+(\._a-z0-9.-+)*@[a-z0-9.-]+(\.[a-z0-9.-]+)*(\.[a-z]{2,3})$"; if (eregi($pattern,$fromEmail)) { //eregi - case insensitive regular expression match return true; } else { return false; } } //FORM SUBMISSION VALIDATION //Scipt checks for new line characters like "\r" or "\n" which allows spam to create a new line //in email headers. If these characters are found return ERROR if (((!isEmailValid($fromEmail)) || ($fromEmail == "")|| (strlen($_POST["Phone"]) < 10 ) || preg_match("/$nn/",$phonee))) { echo "Error - From email address is Invalid or has been left blank or Phone number is not valid." . "<br/><br/>" . "Please return to form and re-enter a valid Email Address or phone number." . "<br/><br/>"; } else { $to = "kcambridge@est-static.com"; $subject = "Aegis Newsletter Signup"; $from = $_POST['Email']; $message =''. " \n"; foreach($_POST as $name => $data) { if(is_array($data)) { foreach($data as $datum) $message .= $name . ": " . $datum . " \n"; } else $message .= $name . ": " . $data . " \n"; } # Attempt to send email if(mail($to, $subject, $message, "From: $fromEmail")) header('location:thanks.htm'); else echo "Mail send failure - message not sent";} ?>

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)
8.3.60.0090.00916.63
8.3.50.0060.01022.11
8.3.40.0060.00919.00
8.3.30.0070.00719.04
8.3.20.0040.00420.25
8.3.10.0050.00323.83
8.3.00.0000.00820.88
8.2.180.0240.00016.88
8.2.170.0120.00322.96
8.2.160.0100.00720.52
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.00
8.2.110.0030.00619.18
8.2.100.0090.00317.91
8.2.90.0040.00419.26
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.93
8.2.50.0040.00418.10
8.2.40.0030.00519.88
8.2.30.0040.00418.39
8.2.20.0080.00017.87
8.2.10.0040.00418.20
8.2.00.0050.00317.75
8.1.280.0040.01525.92
8.1.270.0040.00423.83
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0050.00523.87
8.1.230.0060.00617.61
8.1.220.0000.00917.77
8.1.210.0090.00018.77
8.1.200.0090.00017.25
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0040.00422.00
8.1.150.0050.00318.65
8.1.140.0040.00417.32
8.1.130.0040.00417.89
8.1.120.0000.00817.38
8.1.110.0070.00417.51
8.1.100.0050.00217.50
8.1.90.0040.00417.37
8.1.80.0040.00417.46
8.1.70.0000.00717.45
8.1.60.0030.00517.64
8.1.50.0040.00417.50
8.1.40.0060.00317.53
8.1.30.0030.00717.59
8.1.20.0040.00417.67
8.1.10.0030.00617.59
8.1.00.0040.00817.44
8.0.300.0040.00418.77
8.0.290.0000.00916.75
8.0.280.0070.00018.42
8.0.270.0000.00717.26
8.0.260.0030.00317.27
8.0.250.0030.00317.07
8.0.240.0040.00416.96
8.0.230.0030.00316.93
8.0.220.0000.00716.98
8.0.210.0060.00017.02
8.0.200.0000.00717.02
8.0.190.0040.00417.07
8.0.180.0040.00816.93
8.0.170.0030.00517.05
8.0.160.0070.00016.92
8.0.150.0030.00516.82
8.0.140.0050.00316.94
8.0.130.0030.00313.40
8.0.120.0000.00816.94
8.0.110.0030.00517.01
8.0.100.0000.00716.88
8.0.90.0040.00417.03
8.0.80.0090.00616.93
8.0.70.0070.00017.01
8.0.60.0000.00716.84
8.0.50.0040.00416.80
8.0.30.0120.01017.04
8.0.20.0140.00817.40
8.0.10.0050.00216.95
8.0.00.0100.01016.77
7.4.330.0050.00015.20
7.4.320.0000.00716.57
7.4.300.0030.00316.44
7.4.290.0000.00716.62
7.4.280.0040.00416.59
7.4.270.0030.00316.58
7.4.260.0030.00316.56
7.4.250.0080.00016.57
7.4.240.0000.00716.57
7.4.230.0040.00416.64
7.4.220.0120.00716.54
7.4.210.0090.00916.52
7.4.200.0040.00416.52
7.4.160.0100.00616.44
7.4.150.0080.01217.40
7.4.140.0050.01217.86
7.4.130.0090.01016.56
7.4.120.0100.00916.48
7.4.110.0140.00416.64
7.4.100.0090.00916.62
7.4.90.0090.01216.44
7.4.80.0130.00719.39
7.4.70.0060.01216.60
7.4.60.0080.01116.59
7.4.50.0000.00816.72
7.4.40.0040.01416.49
7.4.30.0070.01016.71
7.4.10.0060.00614.73
7.4.00.0070.00815.03
7.3.330.0050.00013.45
7.3.320.0000.00513.33
7.3.310.0000.00716.28
7.3.300.0000.00716.24
7.3.290.0090.00616.32
7.3.280.0120.00716.36
7.3.270.0090.00917.40
7.3.260.0100.00716.58
7.3.250.0110.00716.55
7.3.240.0170.00316.57
7.3.230.0070.01016.39
7.3.210.0100.00716.41
7.3.200.0090.00919.39
7.3.190.0070.01316.26
7.3.180.0160.00316.33
7.3.170.0120.00916.31
7.3.160.0080.01116.54
7.3.130.0040.01415.05
7.3.120.0060.01114.88
7.3.110.0070.01114.60
7.3.100.0040.01115.10
7.3.90.0090.00315.11
7.3.80.0070.00714.54
7.3.70.0070.00714.96
7.3.60.0100.00314.68
7.3.50.0080.00814.95
7.3.40.0060.00614.61
7.3.30.0060.00614.81
7.3.20.0100.00616.70
7.3.10.0060.01116.50
7.3.00.0090.01016.22
7.2.330.0160.00716.81
7.2.320.0190.00616.81
7.2.310.0110.00616.76
7.2.300.0030.01416.48
7.2.290.0120.01216.40
7.2.260.0030.01315.10
7.2.250.0070.01015.11
7.2.240.0060.00915.08
7.2.230.0070.01014.98
7.2.220.0040.00715.15
7.2.210.0120.00415.00
7.2.200.0000.01415.20
7.2.190.0030.01315.14
7.2.180.0080.00615.23
7.2.170.0060.00915.07
7.2.160.0120.00315.07
7.2.150.0040.01117.02
7.2.140.0040.00716.89
7.2.130.0060.01316.66
7.2.120.0110.00616.78
7.2.110.0040.00816.75
7.2.100.0150.00416.61
7.2.90.0130.00316.86
7.2.80.0100.00816.73
7.2.70.0090.00716.79
7.2.60.0090.00816.77
7.2.50.0150.00516.75
7.2.40.0070.01216.88
7.2.30.0080.00816.77
7.2.20.0080.00916.55
7.2.10.0110.00916.84
7.2.00.0100.00717.63
7.1.330.0090.00615.97
7.1.320.0030.01015.68
7.1.310.0000.01415.86
7.1.300.0070.00715.84
7.1.290.0030.01015.59
7.1.280.0070.00715.93
7.1.270.0090.00615.88
7.1.260.0040.00715.84
7.1.250.0070.00915.58
7.1.240.0000.01215.89
7.1.230.0040.01115.69
7.1.220.0080.00315.68
7.1.210.0000.01515.58
7.1.200.0080.00715.82
7.1.190.0070.01015.96
7.1.180.0060.00915.63
7.1.170.0000.00915.92
7.1.160.0070.00715.77
7.1.150.0060.00615.48
7.1.140.0030.00515.92
7.1.130.0040.00715.75
7.1.120.0040.00415.74
7.1.110.0110.00415.96
7.1.100.0070.00715.81
7.1.90.0040.00415.92
7.1.80.0030.01015.78
7.1.70.0000.01016.53
7.1.60.0050.00616.48
7.1.50.0050.01316.11
7.1.40.0040.01115.70
7.1.30.0040.00815.75
7.1.20.0080.00315.79
7.1.10.0070.00415.80
7.1.00.0080.03819.09
7.0.330.0060.00615.06
7.0.320.0030.01115.61
7.0.310.0120.00315.51
7.0.300.0080.00515.50
7.0.290.0070.00715.35
7.0.280.0060.00615.43
7.0.270.0090.00315.45
7.0.260.0040.00415.52
7.0.250.0060.00615.57
7.0.240.0030.01015.55
7.0.230.0000.01215.36
7.0.220.0040.00815.46
7.0.210.0070.00715.19
7.0.200.0050.00616.07
7.0.190.0040.00815.36
7.0.180.0040.00415.47
7.0.170.0080.00415.25
7.0.160.0030.00915.35
7.0.150.0060.00315.45
7.0.140.0050.03918.86
7.0.130.0030.00715.14
7.0.120.0100.00315.55
7.0.110.0000.01015.12
7.0.100.0070.00715.13
7.0.90.0040.01115.45
7.0.80.0030.00715.57
7.0.70.0000.01215.23
7.0.60.0080.04017.61
7.0.50.0030.02716.75
7.0.40.0090.03716.87
7.0.30.0170.04316.70
7.0.20.0160.04316.82
7.0.10.0230.03516.78
7.0.00.0070.04416.80
5.6.400.0060.00614.25
5.6.390.0030.00914.27
5.6.380.0080.00814.53
5.6.370.0030.00814.45
5.6.360.0000.01314.61
5.6.350.0050.00514.62
5.6.340.0030.01314.73
5.6.330.0030.01214.45
5.6.320.0000.00814.61
5.6.310.0040.00814.53
5.6.300.0060.00614.45
5.6.290.0060.00914.66
5.6.280.0040.04017.62
5.6.270.0040.01114.40
5.6.260.0120.00314.65
5.6.250.0070.00414.65
5.6.240.0080.00814.58
5.6.230.0060.00914.53
5.6.220.0030.00914.49
5.6.210.0170.03217.67
5.6.200.0030.04716.19
5.6.190.0130.02817.69
5.6.180.0040.04917.44
5.6.170.0180.04417.49
5.6.160.0030.02917.59
5.6.150.0040.04916.34
5.6.140.0050.04116.42
5.6.130.0070.04216.39
5.6.120.0070.03017.78
5.6.110.0000.05117.78
5.6.100.0080.04217.63
5.6.90.0040.03817.72
5.6.80.0050.04117.32
5.6.70.0100.04017.36
5.6.60.0030.01314.28
5.6.50.0040.01414.36
5.6.40.0070.01014.62
5.6.30.0030.01014.46
5.6.20.0100.00314.27
5.6.10.0090.00014.10
5.6.00.0030.01014.37
5.5.380.0150.00014.49
5.5.370.0040.01114.59
5.5.360.0090.00614.50
5.5.350.0060.03017.53
5.5.340.0030.02316.34
5.5.330.0100.02017.29
5.5.320.0060.02717.35
5.5.310.0200.03817.13
5.5.300.0020.04916.41
5.5.290.0030.02616.20
5.5.280.0070.02517.73
5.5.270.0080.04517.58
5.5.260.0100.04017.52
5.5.250.0050.04517.56
5.5.240.0110.03817.36
5.5.230.0040.00814.43
5.5.220.0120.00314.43
5.5.210.0120.00314.25
5.5.200.0080.00414.34
5.5.190.0090.00014.18
5.5.180.0000.01414.29
5.5.170.0070.00314.17
5.5.160.0040.00814.19
5.5.150.0060.00914.38
5.5.140.0050.00314.55
5.5.130.0040.00814.38
5.5.120.0070.00714.29
5.5.110.0100.00314.31
5.5.100.0090.00314.42
5.5.90.0040.01114.34
5.5.80.0070.00414.39
5.5.70.0030.00914.23
5.5.60.0110.00013.91
5.5.50.0060.00614.39
5.5.40.0080.00414.13
5.5.30.0040.01114.32
5.5.20.0070.00714.04
5.5.10.0040.01114.52
5.5.00.0060.00914.25
5.4.450.0180.02219.69
5.4.440.0150.02719.81
5.4.430.0220.01819.37
5.4.420.0250.02519.09
5.4.410.0180.02618.81
5.4.400.0150.02318.48
5.4.390.0090.02818.63
5.4.380.0130.03214.71
5.4.370.0200.03014.83
5.4.360.0230.03615.03
5.4.350.0240.02815.02
5.4.340.0170.03215.00
5.4.330.0000.00710.90
5.4.320.0060.02211.85
5.4.310.0020.02411.82
5.4.300.0020.02411.76
5.4.290.0080.02111.96
5.4.280.0050.02211.79
5.4.270.0040.02111.74
5.4.260.0080.02311.77
5.4.250.0060.03011.90
5.4.240.0050.02311.66
5.4.230.0070.02711.72
5.4.220.0060.03011.76
5.4.210.0040.03011.84
5.4.200.0060.02911.71
5.4.190.0070.02911.73
5.4.180.0040.02911.76
5.4.170.0050.02611.84
5.4.160.0060.02411.75
5.4.150.0070.02011.75
5.4.140.0020.03211.48
5.4.130.0080.02611.70
5.4.120.0100.02211.73
5.4.110.0030.02111.66
5.4.100.0060.02111.58
5.4.90.0040.02311.63
5.4.80.0050.02411.52
5.4.70.0050.02111.63
5.4.60.0040.02511.65
5.4.50.0060.01911.50
5.4.40.0040.02111.46
5.4.30.0070.02311.66
5.4.20.0100.02011.62
5.4.10.0060.02111.60
5.4.00.0040.02411.23
5.3.290.0040.02411.76
5.3.280.0050.02811.64
5.3.270.0020.03011.53
5.3.260.0050.02511.70
5.3.250.0050.02111.69
5.3.240.0060.02111.55
5.3.230.0060.02211.55
5.3.220.0050.02111.68
5.3.210.0070.01911.68
5.3.200.0040.02311.66
5.3.190.0040.02911.72
5.3.180.0050.03011.63
5.3.170.0060.02111.63
5.3.160.0080.02111.63
5.3.150.0050.02411.81
5.3.140.0050.02411.63
5.3.130.0050.02411.59
5.3.120.0060.02011.56
5.3.110.0040.02511.56
5.3.100.0040.02111.33
5.3.90.0060.02111.36
5.3.80.0050.02111.34
5.3.70.0040.02311.28
5.3.60.0060.01911.27
5.3.50.0040.02311.34
5.3.40.0040.02311.39
5.3.30.0040.02011.22
5.3.20.0050.02111.04
5.3.10.0060.02011.05
5.3.00.0030.02111.07
5.2.170.0050.0309.25
5.2.160.0080.0279.25
5.2.150.0030.0339.25
5.2.140.0070.0289.25
5.2.130.0060.0299.21
5.2.120.0010.0339.21
5.2.110.0050.0299.22
5.2.100.0040.0309.20
5.2.90.0050.0339.21
5.2.80.0060.0329.20
5.2.70.0070.0329.20
5.2.60.0030.0359.16
5.2.50.0040.0349.13
5.2.40.0060.0309.11
5.2.30.0080.0299.07
5.2.20.0020.0339.08
5.2.10.0050.0298.98
5.2.00.0040.0308.84
5.1.60.0050.0238.13
5.1.50.0040.0258.12
5.1.40.0040.0258.10
5.1.30.0070.0258.45
5.1.20.0080.0238.48
5.1.10.0070.0258.20
5.1.00.0050.0258.20
5.0.50.0040.0206.69
5.0.40.0040.0216.54
5.0.30.0020.0346.36
5.0.20.0030.0206.32
5.0.10.0080.0186.30
5.0.00.0020.0326.29
4.4.90.0020.0174.78
4.4.80.0040.0214.75
4.4.70.0020.0194.75
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0030.0264.71
4.4.30.0030.0154.76
4.4.20.0050.0154.84
4.4.10.0030.0184.85
4.4.00.0050.0254.76
4.3.110.0030.0184.67
4.3.100.0020.0174.66
4.3.90.0010.0164.64
4.3.80.0020.0264.59
4.3.70.0000.0184.63
4.3.60.0020.0154.63
4.3.50.0040.0144.63
4.3.40.0030.0244.54
4.3.30.0010.0173.35
4.3.20.0010.0183.32
4.3.10.0000.0243.27
4.3.00.0070.01326.13

preferences:
45.57 ms | 401 KiB | 5 Q