3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head><title>Process</title></head> <body> <?php $error = ""; //check is field left empty //process registrarion form //checks that the form was actually submitted if($_POST['sub']) //submit button sub { //validation (server side) if ($_POST['name'] == "") //name = "name" $error .="Full name not entered <br />"; if(!isset($_POST['agree'])) //agree for TOS at form.php $error .="You must agree to the TOS"; if(!preg_match("/^\d{3}\.\d{3}\.\d{4}$/",$_POST['phone'])) $error .= "Invalid Phone Number"; //check if errors were found if($error !="") echo "<div style ='color:red;'>$error</div>"; } ?> </body> <html>

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.70.0110.00716.88
8.3.60.0160.00018.56
8.3.50.0110.00621.02
8.3.40.0070.00718.83
8.3.30.0070.00720.35
8.3.20.0080.00020.36
8.3.10.0080.00021.09
8.3.00.0070.00023.64
8.2.180.0090.00916.88
8.2.170.0120.00622.96
8.2.160.0170.00320.52
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00821.18
8.2.110.0060.00319.27
8.2.100.0000.01118.03
8.2.90.0050.00319.17
8.2.80.0080.00017.97
8.2.70.0090.00017.59
8.2.60.0030.00618.16
8.2.50.0040.00718.07
8.2.40.0000.00818.28
8.2.30.0080.00019.49
8.2.20.0000.00817.85
8.2.10.0040.00417.64
8.2.00.0000.00817.68
8.1.280.0120.00325.92
8.1.270.0050.00323.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00620.84
8.1.230.0060.00621.03
8.1.220.0060.00318.77
8.1.210.0000.00918.97
8.1.200.0040.00417.38
8.1.190.0040.00417.52
8.1.180.0030.00618.10
8.1.170.0080.00018.65
8.1.160.0030.00618.90
8.1.150.0070.00018.67
8.1.140.0000.00817.42
8.1.130.0030.00317.83
8.1.120.0040.00417.42
8.1.110.0000.00717.35
8.1.100.0000.00717.36
8.1.90.0040.00317.37
8.1.80.0000.00717.46
8.1.70.0030.00317.47
8.1.60.0030.00617.64
8.1.50.0040.00417.48
8.1.40.0000.00717.55
8.1.30.0050.00317.68
8.1.20.0040.00417.66
8.1.10.0040.00417.48
8.1.00.0030.00517.55
8.0.300.0060.00320.06
8.0.290.0000.00717.04
8.0.280.0000.00718.42
8.0.270.0000.00717.27
8.0.260.0070.00016.89
8.0.250.0050.00317.00
8.0.240.0070.00017.02
8.0.230.0040.00416.91
8.0.220.0060.00316.97
8.0.210.0070.00016.90
8.0.200.0000.00716.99
8.0.190.0040.00417.04
8.0.180.0000.00817.00
8.0.170.0040.00416.93
8.0.160.0070.00016.97
8.0.150.0080.00016.95
8.0.140.0000.00716.98
8.0.130.0050.00013.38
8.0.120.0000.00816.93
8.0.110.0080.00016.91
8.0.100.0070.00017.04
8.0.90.0050.00216.77
8.0.80.0120.00316.92
8.0.70.0040.00416.85
8.0.60.0070.00016.93
8.0.50.0050.00217.08
8.0.30.0100.00817.24
8.0.20.0140.00817.40
8.0.10.0000.00817.14
8.0.00.0160.00216.76
7.4.330.0000.00516.66
7.4.320.0030.00316.65
7.4.300.0030.00316.50
7.4.290.0000.00716.63
7.4.280.0000.00816.64
7.4.270.0030.00516.52
7.4.260.0000.00513.25
7.4.250.0090.00016.51
7.4.240.0030.00316.61
7.4.230.0070.00016.55
7.4.220.0070.01416.69
7.4.210.0100.00716.54
7.4.200.0000.00716.55
7.4.190.0030.00316.54
7.4.160.0100.00616.46
7.4.150.0070.01117.40
7.4.140.0100.00717.86
7.4.130.0080.00816.60
7.4.120.0100.00816.64
7.4.110.0080.01316.59
7.4.100.0130.00316.55
7.4.90.0120.01216.62
7.4.80.0180.00019.39
7.4.70.0080.00816.60
7.4.60.0130.00316.52
7.4.50.0060.00316.66
7.4.40.0090.00322.77
7.4.30.0090.00916.70
7.4.00.0060.00915.09
7.3.330.0050.00013.26
7.3.320.0030.00313.11
7.3.310.0070.00016.33
7.3.300.0030.00316.14
7.3.290.0040.01316.30
7.3.280.0070.01316.28
7.3.270.0110.00717.40
7.3.260.0090.01018.24
7.3.250.0130.00716.40
7.3.240.0070.01416.37
7.3.230.0030.01316.53
7.3.210.0140.00716.34
7.3.200.0070.01019.39
7.3.190.0150.00716.35
7.3.180.0130.00316.47
7.3.170.0100.00616.45
7.3.160.0120.01216.39
7.3.120.0100.00314.66
7.2.330.0030.01316.57
7.2.320.0120.00616.33
7.2.310.0060.01316.82
7.2.300.0080.00916.66
7.2.290.0070.01016.53
7.2.00.0060.01019.51
7.1.100.0000.01517.97
7.1.70.0000.00817.05
7.1.60.0070.01719.17
7.1.50.0070.01116.69
7.1.00.0130.07322.36
7.0.200.0000.00716.64
7.0.140.0030.07322.09
7.0.100.0200.06019.87
7.0.90.0330.04719.96
7.0.80.0030.08020.10
7.0.70.0130.07719.91
7.0.60.0000.05319.96
7.0.50.0230.07720.33
7.0.40.0070.09020.10
7.0.30.0070.08320.07
7.0.20.0070.07719.99
7.0.10.0030.04719.87
7.0.00.0070.08720.02
5.6.280.0000.07320.80
5.6.250.0030.07720.58
5.6.240.0100.08720.61
5.6.230.0100.08020.64
5.6.220.0100.06720.61
5.6.210.0100.07320.55
5.6.200.0100.07320.96
5.6.190.0030.08721.05
5.6.180.0100.07721.05
5.6.170.0130.07721.03
5.6.160.0070.04721.03
5.6.150.0130.07020.98
5.6.140.0030.08321.05
5.6.130.0100.05020.99
5.6.120.0000.09321.02
5.6.110.0170.07320.97
5.6.100.0170.08020.89
5.6.90.0130.04721.03
5.6.80.0030.07720.45
5.6.70.0070.07720.36
5.6.60.0130.07020.43
5.6.50.0130.07020.41
5.6.40.0070.07020.31
5.6.30.0230.06020.26
5.6.20.0200.06720.41
5.6.10.0130.05320.25
5.6.00.0030.07720.33
5.5.380.0030.08320.34
5.5.370.0070.06020.52
5.5.360.0070.08020.40
5.5.350.0100.08020.28
5.5.340.0070.04320.77
5.5.330.0070.04020.79
5.5.320.0170.07020.86
5.5.310.0100.07720.66
5.5.300.0070.05320.68
5.5.290.0070.06720.81
5.5.280.0070.05720.82
5.5.270.0070.05020.83
5.5.260.0130.05020.57
5.5.250.0100.08020.40
5.5.240.0200.06320.20
5.5.230.0070.08319.96
5.5.220.0100.07020.15
5.5.210.0100.05020.24
5.5.200.0070.08320.07
5.5.190.0070.07320.16
5.5.180.0130.07020.22
5.5.160.0130.07720.21
5.5.150.0100.07720.18
5.5.140.0100.07020.11
5.5.130.0130.08020.22
5.5.120.0130.07020.09
5.5.110.0070.08020.09
5.5.100.0030.07320.08
5.5.90.0170.03019.98
5.5.80.0070.07020.02
5.5.70.0030.06019.95
5.5.60.0130.07020.00
5.5.50.0030.05319.95
5.5.40.0100.08019.97
5.5.30.0070.04720.02
5.5.20.0030.07019.98
5.5.10.0130.06719.92
5.5.00.0070.06720.04
5.4.450.0030.04019.29
5.4.440.0100.08019.37
5.4.430.0070.07719.14
5.4.420.0030.07719.42
5.4.410.0070.07719.25
5.4.400.0000.05019.23
5.4.390.0170.03318.90
5.4.380.0170.03319.23
5.4.370.0030.07018.95
5.4.360.0030.06318.94
5.4.350.0030.08018.97
5.4.340.0100.07318.98
5.4.320.0130.06719.03
5.4.310.0070.04019.04
5.4.300.0000.08019.15
5.4.290.0030.04318.82
5.4.280.0200.06719.13
5.4.270.0070.07318.81
5.4.260.0000.05318.98
5.4.250.0130.06718.97
5.4.240.0070.06719.05
5.4.230.0030.05018.95
5.4.220.0000.07319.23
5.4.210.0070.05019.04
5.4.200.0070.06018.98
5.4.190.0130.06718.80
5.4.180.0070.07718.89
5.4.170.0070.06719.02
5.4.160.0070.07718.88
5.4.150.0070.05319.02
5.4.140.0200.04716.01
5.4.130.0000.04016.21
5.4.120.0030.08016.32
5.4.110.0070.06016.33
5.4.100.0070.06716.43
5.4.90.0130.06016.26
5.4.80.0070.06016.32
5.4.70.0030.07716.43
5.4.60.0100.03716.32
5.4.50.0100.05716.19
5.4.40.0000.04716.34
5.4.30.0070.06716.20
5.4.20.0030.06316.38
5.4.10.0100.07016.31
5.4.00.0130.06315.68
5.3.290.0070.07714.60
5.3.280.0100.07314.45
5.3.270.0030.04714.59
5.3.260.0170.06014.47
5.3.250.0070.07714.46
5.3.240.0000.05014.46
5.3.230.0030.04714.58
5.3.220.0030.06714.55
5.3.210.0170.06314.48
5.3.200.0030.04714.56
5.3.190.0000.08014.39
5.3.180.0070.06714.42
5.3.170.0100.04714.43
5.3.160.0030.05014.42
5.3.150.0100.07314.52
5.3.140.0070.06714.50
5.3.130.0100.07014.55
5.3.120.0070.08014.55
5.3.110.0070.03714.40
5.3.100.0000.08014.00
5.3.90.0030.07713.98
5.3.80.0030.05713.87
5.3.70.0100.03713.80
5.3.60.0100.03013.95
5.3.50.0070.05713.91
5.3.40.0170.07013.80
5.3.30.0070.07013.89
5.3.20.0070.07013.54
5.3.10.0070.05313.63
5.3.00.0000.04713.63
5.2.170.0130.05011.20
5.2.160.0000.03711.19
5.2.150.0030.05010.90
5.2.140.0070.06010.93
5.2.130.0130.06010.94
5.2.120.0000.06711.05
5.2.110.0100.05711.08
5.2.100.0100.05310.92
5.2.90.0030.06011.13
5.2.80.0070.04011.09
5.2.70.0030.06310.92
5.2.60.0070.03311.07
5.2.50.0100.04710.88
5.2.40.0130.05010.98
5.2.30.0100.05310.92
5.2.20.0130.04711.00
5.2.10.0030.03310.94
5.2.00.0100.05710.64
5.1.60.0030.05710.09
5.1.50.0100.03310.06
5.1.40.0070.05010.07
5.1.30.0070.03010.39
5.1.20.0000.06010.41
5.1.10.0100.04310.08
5.1.00.0070.04710.16
5.0.50.0070.0278.64
5.0.40.0070.0438.50
5.0.30.0030.0608.29
5.0.20.0000.0238.32
5.0.10.0030.0438.29
5.0.00.0100.0378.29
4.4.90.0030.0378.29
4.4.80.0000.0378.29
4.4.70.0000.0178.29
4.4.60.0000.0178.29
4.4.50.0000.0308.29
4.4.40.0030.0438.29
4.4.30.0000.0378.29
4.4.20.0000.0338.29
4.4.10.0070.0308.29
4.4.00.0030.0538.29
4.3.110.0000.0378.29
4.3.100.0030.0338.29
4.3.90.0030.0338.29
4.3.80.0070.0478.29
4.3.70.0000.0378.29
4.3.60.0030.0178.29
4.3.50.0000.0208.29
4.3.40.0000.0478.29
4.3.30.0000.0378.29
4.3.20.0100.0238.29
4.3.10.0000.0308.29
4.3.00.0000.0378.29

preferences:
65.32 ms | 401 KiB | 5 Q