3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 1000; $start = microtime(true); $a = ''; for($i = 0; $i < $count; $i++) { $a .= 'a'; } printf("#1, done in %f\n", microtime(true) - $start); $start = microtime(true); $a = ""; for($i = 0; $i < $count; $i++) { $a .= "a"; } printf("#2, done in %f\n", microtime(true) - $start);

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.0030.01016.81
7.3.00.0040.00816.68
7.2.130.0080.00616.71
7.2.120.0100.00416.94
7.2.110.0150.00016.89
7.2.100.0000.01017.05
7.2.90.0060.00616.99
7.2.80.0030.00816.92
7.2.70.0040.01116.92
7.2.60.0030.01016.81
7.2.50.0060.00616.94
7.2.40.0040.00716.87
7.2.30.0030.01016.75
7.2.20.0030.00617.04
7.2.10.0040.00716.60
7.2.00.0030.00918.07
7.1.250.0030.01215.55
7.1.70.0030.00716.95
7.1.60.0040.01819.69
7.1.50.0030.01716.83
7.1.00.0030.06322.44
7.0.200.0000.00916.59
7.0.140.0100.06022.16
7.0.100.0070.05719.98
7.0.90.0030.04019.96
7.0.80.0000.04319.88
7.0.70.0030.03319.90
7.0.60.0100.03019.94
7.0.50.0300.07320.42
7.0.40.0170.07020.09
7.0.30.0030.08720.13
7.0.20.0170.07319.99
7.0.10.0130.07320.05
7.0.00.0030.06720.17
5.6.280.0030.07320.99
5.6.250.0070.04020.67
5.6.240.0000.03720.52
5.6.230.0030.04020.57
5.6.220.0030.04320.64
5.6.210.0030.03320.47
5.6.200.0030.05021.03
5.6.190.0070.08020.93
5.6.180.0030.08721.07
5.6.170.0130.08021.11
5.6.160.0030.05721.07
5.6.150.0100.08321.00
5.6.140.0070.07721.16
5.6.130.0070.08321.10
5.6.120.0200.07021.16
5.6.110.0070.05021.10
5.6.100.0130.05021.06
5.6.90.0000.08020.92
5.6.80.0100.08020.34
5.6.70.0100.06720.40
5.6.60.0130.05320.45
5.6.50.0130.06020.42
5.6.40.0070.08020.36
5.6.30.0100.07720.32
5.6.20.0100.08320.48
5.6.10.0070.07720.36
5.6.00.0070.08320.37
5.5.380.0030.04720.38
5.5.370.0030.03320.43
5.5.360.0070.04020.49
5.5.350.0070.04320.34
5.5.340.0030.08320.82
5.5.330.0100.08320.91
5.5.320.0130.05320.91
5.5.310.0130.07720.73
5.5.300.0100.07320.82
5.5.290.0100.06720.77
5.5.280.0070.06020.90
5.5.270.0030.07720.87
5.5.260.0130.08320.73
5.5.250.0100.05020.73
5.5.240.0130.05320.27
5.5.230.0100.08020.25
5.5.220.0100.07320.16
5.5.210.0070.07720.26
5.5.200.0000.05020.18
5.5.190.0030.06720.23
5.5.180.0170.05720.20
5.5.160.0230.06320.25
5.5.150.0100.08020.15
5.5.140.0070.08020.10
5.5.130.0000.04720.23
5.5.120.0170.07020.05
5.5.110.0130.07020.14
5.5.100.0170.07319.95
5.5.90.0100.07320.00
5.5.80.0170.05020.00
5.5.70.0200.04020.10
5.5.60.0070.07720.02
5.5.50.0200.06719.95
5.5.40.0100.08320.13
5.5.30.0100.07020.06
5.5.20.0070.07320.07
5.5.10.0030.06320.11
5.5.00.0100.07020.00
5.4.450.0030.05719.36
5.4.440.0130.07319.29
5.4.430.0030.07319.34
5.4.420.0070.07019.45
5.4.410.0000.08719.01
5.4.400.0100.06319.07
5.4.390.0070.05319.06
5.4.380.0030.07318.84
5.4.370.0130.05019.11
5.4.360.0130.06019.12
5.4.350.0030.07018.98
5.4.340.0100.07319.12
5.4.320.0200.06319.13
5.4.310.0030.07318.90
5.4.300.0070.04018.80
5.4.290.0070.07019.03
5.4.280.0030.07019.01
5.4.270.0000.08319.00
5.4.260.0070.08318.89
5.4.250.0070.04719.02
5.4.240.0170.06019.06
5.4.230.0000.07019.11
5.4.220.0130.07319.12
5.4.210.0100.08319.04
5.4.200.0030.07719.22
5.4.190.0200.06018.79
5.4.180.0130.06718.95
5.4.170.0070.07018.92
5.4.160.0130.05318.80
5.4.150.0070.07319.05
5.4.140.0130.06016.23
5.4.130.0070.04016.23
5.4.120.0070.06716.31
5.4.110.0100.07016.41
5.4.100.0030.06016.41
5.4.90.0000.04716.25
5.4.80.0070.07316.39
5.4.70.0000.05716.31
5.4.60.0130.03316.39
5.4.50.0070.07016.42
5.4.40.0030.08016.34
5.4.30.0030.04716.23
5.4.20.0030.07716.27
5.4.10.0000.07316.28
5.4.00.0100.06715.72
5.3.290.0200.06314.65
5.3.280.0130.07014.53
5.3.270.0100.04714.59
5.3.260.0030.07014.52
5.3.250.0070.07714.56
5.3.240.0030.08014.48
5.3.230.0030.05314.45
5.3.220.0170.06714.53
5.3.210.0100.07014.50
5.3.200.0100.07014.48
5.3.190.0030.07314.55
5.3.180.0100.05014.55
5.3.170.0070.07014.40
5.3.160.0070.07714.51
5.3.150.0070.04314.57
5.3.140.0000.04714.38
5.3.130.0100.07714.38
5.3.120.0070.06714.41
5.3.110.0130.04314.40
5.3.100.0100.07314.02
5.3.90.0100.04313.97
5.3.80.0030.05013.99
5.3.70.0070.06313.92
5.3.60.0070.05713.99
5.3.50.0170.03313.95
5.3.40.0100.06713.94
5.3.30.0030.07313.92
5.3.20.0130.03313.68
5.3.10.0000.04313.63
5.3.00.0070.04713.50
5.2.170.0070.05311.06
5.2.160.0130.04011.13
5.2.150.0030.06311.10
5.2.140.0100.05311.20
5.2.130.0070.03311.09
5.2.120.0030.03011.04
5.2.110.0030.06310.93
5.2.100.0130.06011.12
5.2.90.0100.06010.92
5.2.80.0070.05310.93
5.2.70.0030.05310.93
5.2.60.0100.05711.04
5.2.50.0030.06710.86
5.2.40.0070.05710.98
5.2.30.0000.06010.86
5.2.20.0070.04311.00
5.2.10.0070.04710.90
5.2.00.0070.05310.74
5.1.60.0030.06010.02
5.1.50.0030.04710.04
5.1.40.0070.05310.08
5.1.30.0000.05310.42
5.1.20.0100.03010.38
5.1.10.0000.05010.07
5.1.00.0000.03710.11
5.0.50.0100.0408.65
5.0.40.0030.0338.51
5.0.30.0000.0608.51
5.0.20.0000.0308.51
5.0.10.0000.0478.51
5.0.00.0070.0538.51
4.4.90.0000.0338.51
4.4.80.0030.0178.51
4.4.70.0030.0378.51
4.4.60.0030.0338.51
4.4.50.0100.0308.51
4.4.40.0000.0578.51
4.4.30.0100.0308.51
4.4.20.0000.0278.51
4.4.10.0030.0278.51
4.4.00.0000.0578.51
4.3.110.0030.0338.51
4.3.100.0030.0308.51
4.3.90.0070.0278.51
4.3.80.0070.0508.51
4.3.70.0030.0278.51
4.3.60.0030.0378.51
4.3.50.0000.0378.51
4.3.40.0000.0578.51
4.3.30.0000.0238.51
4.3.20.0030.0208.51
4.3.10.0000.0408.51
4.3.00.0000.0208.51

preferences:
32.31 ms | 400 KiB | 5 Q