3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foobar = $_POST["code"]; // This contains a SQL-injection vulnerability; But that's a separate issue, I think $query = "INSERT INTO table (field) VALUES (\"" . $foobar . "\")"; // Use variable in a query string

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.0110.00416.61
8.3.50.0110.00521.87
8.3.40.0110.00418.63
8.3.30.0100.00318.96
8.3.20.0000.00820.25
8.3.10.0040.00423.48
8.3.00.0080.00022.18
8.2.180.0120.00616.63
8.2.170.0100.00722.96
8.2.160.0100.00722.11
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0070.00726.16
8.2.120.0000.00822.10
8.2.110.0090.00020.36
8.2.100.0040.00818.02
8.2.90.0000.00818.16
8.2.80.0060.00318.05
8.2.70.0080.00317.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0060.00619.09
8.2.30.0070.00018.12
8.2.20.0000.00717.82
8.2.10.0050.00317.67
8.2.00.0070.00017.79
8.1.280.0150.00025.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00822.18
8.1.230.0080.00420.96
8.1.220.0050.00317.91
8.1.210.0000.00818.94
8.1.200.0000.00917.25
8.1.190.0000.00817.54
8.1.180.0000.00818.10
8.1.170.0030.00618.72
8.1.160.0050.00221.88
8.1.150.0070.00018.55
8.1.140.0040.00417.45
8.1.130.0000.00717.73
8.1.120.0050.00217.50
8.1.110.0000.00717.43
8.1.100.0000.00717.46
8.1.90.0070.00217.48
8.1.80.0070.00017.33
8.1.70.0070.00017.31
8.1.60.0090.00017.57
8.1.50.0060.00317.56
8.1.40.0060.00317.51
8.1.30.0000.00717.64
8.1.20.0050.00317.60
8.1.10.0000.00917.58
8.1.00.0040.00417.41
8.0.300.0040.00420.09
8.0.290.0080.00017.16
8.0.280.0030.00318.34
8.0.270.0070.00017.25
8.0.260.0070.00016.79
8.0.250.0070.00017.00
8.0.240.0000.00816.99
8.0.230.0030.00316.91
8.0.220.0000.00716.80
8.0.210.0000.00717.00
8.0.200.0000.00616.87
8.0.190.0000.00716.99
8.0.180.0060.00316.86
8.0.170.0080.00016.86
8.0.160.0040.00416.89
8.0.150.0000.00716.88
8.0.140.0040.00416.74
8.0.130.0070.00013.41
8.0.120.0070.00016.93
8.0.110.0000.00716.77
8.0.100.0040.00416.82
8.0.90.0000.00716.95
8.0.80.0120.00416.90
8.0.70.0030.00516.91
8.0.60.0000.00716.80
8.0.50.0030.00616.80
8.0.30.0070.01217.10
8.0.20.0090.01117.40
8.0.10.0000.00717.10
8.0.00.0100.00916.71
7.4.330.0000.00515.00
7.4.320.0040.00416.42
7.4.300.0040.00416.59
7.4.290.0060.00016.44
7.4.280.0030.00316.47
7.4.270.0030.00316.62
7.4.260.0030.00316.48
7.4.250.0040.00416.59
7.4.240.0040.00416.49
7.4.230.0040.00416.42
7.4.220.0040.01116.70
7.4.210.0080.01116.53
7.4.200.0000.00716.40
7.4.190.0000.00716.67
7.4.160.0150.00016.64
7.4.150.0060.01117.40
7.4.140.0140.00317.86
7.4.130.0070.00916.48
7.4.120.0050.01316.59
7.4.110.0020.01516.43
7.4.100.0180.00316.54
7.4.90.0120.00616.57
7.4.80.0110.00716.42
7.4.70.0070.00916.57
7.4.60.0130.00916.64
7.4.50.0030.00616.56
7.4.40.0060.00922.77
7.4.30.0080.00816.50
7.4.00.0030.01214.84
7.3.330.0000.00513.29
7.3.320.0000.00513.27
7.3.310.0000.00716.34
7.3.300.0070.00016.37
7.3.290.0140.00016.43
7.3.280.0080.00816.38
7.3.270.0030.01417.40
7.3.260.0120.00616.58
7.3.250.0140.00516.53
7.3.240.0130.00616.38
7.3.230.0090.00916.39
7.3.210.0120.00416.36
7.3.200.0110.01119.39
7.3.190.0130.01016.37
7.3.180.0060.00916.45
7.3.170.0090.00616.47
7.3.160.0100.00716.40
7.3.120.0070.01014.91
7.2.330.0030.01516.68
7.2.320.0070.01416.54
7.2.310.0060.01616.65
7.2.300.0170.00316.75
7.2.290.0130.00316.50
7.2.60.0180.00416.91
7.2.00.0000.00919.19
7.1.200.0100.00715.83
7.1.100.0090.00318.12
7.1.70.0000.01016.88
7.1.60.0090.01519.29
7.1.50.0150.01516.96
7.1.00.0170.06322.36
7.0.200.0120.00616.57
7.0.140.0070.07322.00
7.0.100.0230.09019.93
7.0.90.0030.08719.81
7.0.80.0100.04319.89
7.0.70.0070.06020.02
7.0.60.0430.08019.95
7.0.50.0400.06720.33
7.0.40.0070.08320.15
7.0.30.0000.08020.15
7.0.20.0170.07320.14
7.0.10.0030.07320.14
7.0.00.0100.08020.04
5.6.250.0130.07320.62
5.6.240.0230.07020.50
5.6.230.0230.08320.62
5.6.220.0130.08020.61
5.6.210.0100.07020.46
5.6.200.0130.08021.04
5.6.190.0070.08721.10
5.6.180.0030.06721.16
5.6.170.0070.05720.93
5.6.160.0070.05321.01
5.6.150.0070.04721.04
5.6.140.0030.05021.07
5.6.130.0100.07721.04
5.6.120.0130.06321.01
5.6.110.0100.07721.00
5.6.100.0130.07020.87
5.6.90.0100.06321.05
5.6.80.0070.08020.48
5.6.70.0100.04020.45
5.6.60.0100.04020.39
5.6.50.0130.06320.48
5.6.40.0030.05720.35
5.6.30.0100.07320.29
5.6.20.0100.07720.48
5.6.10.0130.07720.28
5.6.00.0130.07020.40
5.5.380.0170.06720.45
5.5.370.0100.07320.39
5.5.360.0030.05320.42
5.5.350.0170.07320.32
5.5.340.0100.05720.72
5.5.330.0070.07720.92
5.5.320.0170.07020.82
5.5.310.0130.08020.76
5.5.300.0070.05720.82
5.5.290.0170.07720.79
5.5.280.0100.04720.91
5.5.270.0130.07020.81
5.5.260.0100.08320.86
5.5.250.0030.05720.71
5.5.240.0200.02720.26
5.5.230.0030.06020.16
5.5.220.0130.07720.16
5.5.210.0070.06320.10
5.5.200.0130.06720.25
5.5.190.0030.06020.18
5.5.180.0130.03320.15
5.5.160.0030.08320.23
5.5.150.0030.07320.23
5.5.140.0030.06720.13
5.5.130.0130.07020.25
5.5.120.0200.04720.07
5.5.110.0000.05020.11
5.5.100.0200.07020.17
5.5.90.0100.06320.05
5.5.80.0070.07720.09
5.5.70.0030.05320.05
5.5.60.0100.07320.14
5.5.50.0030.06720.07
5.5.40.0100.07320.09
5.5.30.0070.06320.04
5.5.20.0000.08720.09
5.5.10.0070.03719.97
5.5.00.0030.07320.02
5.4.450.0200.03319.42
5.4.440.0000.05319.30
5.4.430.0070.08019.36
5.4.420.0030.04719.11
5.4.410.0170.05319.24
5.4.400.0100.07318.79
5.4.390.0100.07319.03
5.4.380.0000.07318.96
5.4.370.0100.06718.98
5.4.360.0130.06319.14
5.4.350.0030.05719.05
5.4.340.0070.07019.01
5.4.320.0070.04319.10
5.4.310.0070.04018.79
5.4.300.0000.04319.07
5.4.290.0070.07318.80
5.4.280.0100.06718.93
5.4.270.0130.06719.12
5.4.260.0130.05018.94
5.4.250.0030.04318.78
5.4.240.0070.07318.94
5.4.230.0070.07319.09
5.4.220.0130.06019.09
5.4.210.0030.07719.13
5.4.200.0070.04718.89
5.4.190.0030.08319.21
5.4.180.0070.07019.10
5.4.170.0070.06319.04
5.4.160.0100.04019.00
5.4.150.0070.03719.09
5.4.140.0100.05316.29
5.4.130.0130.06016.28
5.4.120.0070.03716.35
5.4.110.0070.04016.23
5.4.100.0070.04316.21
5.4.90.0030.04316.29
5.4.80.0100.05316.19
5.4.70.0100.03316.34
5.4.60.0070.06716.29
5.4.50.0030.04016.23
5.4.40.0100.06316.29
5.4.30.0130.06016.41
5.4.20.0000.06316.39
5.4.10.0000.04716.19
5.4.00.0130.05715.66
5.3.290.0100.03714.59
5.3.280.0070.06314.50
5.3.270.0030.05714.42
5.3.260.0130.07014.43
5.3.250.0030.04014.57
5.3.240.0030.03714.43
5.3.230.0000.05014.53
5.3.220.0100.04314.39
5.3.210.0100.06714.38
5.3.200.0100.05014.52
5.3.190.0130.07314.55
5.3.180.0130.06014.49
5.3.170.0030.04314.50
5.3.160.0070.04314.56
5.3.150.0030.07714.41
5.3.140.0100.06714.37
5.3.130.0130.06714.38
5.3.120.0070.06714.50
5.3.110.0030.06714.45
5.3.100.0070.07713.89
5.3.90.0130.06013.87
5.3.80.0000.07713.79
5.3.70.0070.07013.92
5.3.60.0100.04013.96
5.3.50.0000.04713.93
5.3.40.0000.05713.93
5.3.30.0070.03713.76
5.3.20.0000.06313.68
5.3.10.0100.05713.41
5.3.00.0170.05313.61
5.2.170.0100.05310.98
5.2.160.0030.03011.18
5.2.150.0030.04311.18
5.2.140.0000.04310.93
5.2.130.0070.06311.04
5.2.120.0030.06710.96
5.2.110.0030.06310.91
5.2.100.0000.05311.07
5.2.90.0070.06011.08
5.2.80.0100.05310.95
5.2.70.0030.04011.14
5.2.60.0100.03711.04
5.2.50.0000.05010.86
5.2.40.0030.05710.93
5.2.30.0030.05310.81
5.2.20.0030.06310.91
5.2.10.0030.03710.93
5.2.00.0030.06310.71
5.1.60.0030.05010.03
5.1.50.0030.04010.07
5.1.40.0000.0309.96
5.1.30.0070.04010.26
5.1.20.0100.04310.29
5.1.10.0100.04710.07
5.1.00.0100.0379.90
5.0.50.0130.0178.57
5.0.40.0000.0208.43
5.0.30.0000.0378.25
5.0.20.0070.0378.18
5.0.10.0000.0438.16
5.0.00.0000.0507.99
4.4.90.0070.0107.95
4.4.80.0030.0207.95
4.4.70.0000.0407.95
4.4.60.0000.0237.95
4.4.50.0070.0207.95
4.4.40.0030.0507.95
4.4.30.0030.0307.95
4.4.20.0030.0307.95
4.4.10.0030.0177.95
4.4.00.0030.0277.95
4.3.110.0000.0307.95
4.3.100.0030.0237.95
4.3.90.0100.0237.95
4.3.80.0030.0437.95
4.3.70.0000.0177.95
4.3.60.0000.0377.95
4.3.50.0000.0237.95
4.3.40.0030.0277.95
4.3.30.0030.0207.95
4.3.20.0000.0237.95
4.3.10.0000.0177.95
4.3.00.0030.0137.95

preferences:
45.9 ms | 401 KiB | 5 Q