3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration global $x; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $x = array_fill(5, 1000, $tmp); unset($i, $tmp); // Test Source function Test3_1() { global $x; /* The Test */ $t = microtime(true); $size = count($x); for ($i=0; $i<$size; $i++); return (microtime(true) - $t); } // Variable Clean-up function Test3_End() { global $x; unset($x); } ?>

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.01314.86
7.3.120.0060.01214.92
7.3.110.0040.01414.78
7.3.100.0000.02014.75
7.3.90.0130.00615.25
7.3.80.0090.00615.28
7.3.70.0030.00614.79
7.3.60.0040.01114.83
7.3.50.0100.00714.91
7.3.40.0030.01014.66
7.3.30.0040.01414.77
7.3.20.0070.00716.67
7.3.10.0060.00916.36
7.3.00.0100.00316.69
7.2.250.0100.01015.25
7.2.240.0060.01215.18
7.2.230.0070.01015.25
7.2.220.0000.01115.03
7.2.210.0100.00615.18
7.2.200.0120.00015.16
7.2.190.0000.01015.11
7.2.180.0070.00715.25
7.2.170.0030.00615.23
7.1.330.0030.01315.75
7.1.320.0030.01215.75
7.1.310.0030.00915.77
7.1.300.0030.01015.63
7.1.290.0070.00715.92
7.1.280.0030.00615.68
7.1.270.0030.01315.77
7.1.260.0030.01315.95
7.1.70.0040.00416.87
7.1.60.0100.01619.46
7.1.50.0040.00817.09
7.1.00.0070.07722.43
7.0.200.0030.00616.71
7.0.140.0000.07321.98
7.0.100.0030.07320.05
7.0.90.0170.04320.14
7.0.80.0130.07720.06
7.0.70.0070.07019.97
7.0.60.0270.06020.08
7.0.50.0100.07320.45
7.0.40.0130.07720.09
7.0.30.0170.07320.11
7.0.20.0070.08020.14
7.0.10.0170.05720.09
7.0.00.0130.07720.10
5.6.280.0030.07721.11
5.6.250.0170.07320.76
5.6.240.0030.09020.71
5.6.230.0130.07320.63
5.6.220.0100.08720.65
5.6.210.0100.07320.81
5.6.200.0130.08721.07
5.6.190.0170.07721.12
5.6.180.0030.09321.06
5.6.170.0100.08321.15
5.6.160.0030.05721.15
5.6.150.0100.08321.15
5.6.140.0030.07021.12
5.6.130.0070.09021.11
5.6.120.0070.07321.09
5.6.110.0100.08021.16
5.6.100.0070.07721.07
5.6.90.0130.07021.03
5.6.80.0130.04020.38
5.6.70.0030.04720.59
5.6.60.0170.06720.44
5.6.50.0070.08020.50
5.6.40.0030.07320.44
5.6.30.0130.06720.50
5.6.20.0100.07720.39
5.6.10.0100.08320.34
5.6.00.0030.07020.41
5.5.380.0170.06720.61
5.5.370.0070.07720.46
5.5.360.0100.08020.43
5.5.350.0170.07020.51
5.5.340.0070.08020.68
5.5.330.0130.07020.91
5.5.320.0130.07320.64
5.5.310.0000.08720.92
5.5.300.0170.04320.81
5.5.290.0070.07720.95
5.5.280.0100.08320.86
5.5.270.0100.07320.76
5.5.260.0070.05020.76
5.5.250.0070.04320.61
5.5.240.0030.08020.31
5.5.230.0200.07020.21
5.5.220.0130.07720.19
5.5.210.0070.07720.25
5.5.200.0070.08020.27
5.5.190.0100.07320.14
5.5.180.0130.06720.13
5.5.160.0100.08020.19
5.5.150.0070.07720.22
5.5.140.0070.07320.12
5.5.130.0230.06020.18
5.5.120.0130.07320.26
5.5.110.0070.05320.11
5.5.100.0130.05020.20
5.5.90.0100.07020.11
5.5.80.0100.07320.19
5.5.70.0070.08320.11
5.5.60.0100.07020.10
5.5.50.0070.07720.15
5.5.40.0000.06020.09
5.5.30.0170.07020.09
5.5.20.0130.05320.09
5.5.10.0070.08720.14
5.5.00.0100.07320.05
5.4.450.0070.04019.56
5.4.440.0170.06319.28
5.4.430.0030.04019.36
5.4.420.0170.07019.46
5.4.410.0100.07319.05
5.4.400.0070.07319.05
5.4.390.0030.08319.03
5.4.380.0100.07019.21
5.4.370.0070.08019.21
5.4.360.0100.07719.14
5.4.350.0070.05318.90
5.4.340.0030.08319.05
5.4.320.0230.03019.09
5.4.310.0070.08019.14
5.4.300.0100.07319.05
5.4.290.0030.05019.09
5.4.280.0070.08019.23
5.4.270.0030.07319.03
5.4.260.0170.06319.14
5.4.250.0070.07718.90
5.4.240.0100.07019.03
5.4.230.0070.04319.12
5.4.220.0100.07019.15
5.4.210.0170.06719.14
5.4.200.0100.04319.14
5.4.190.0030.07319.13
5.4.180.0070.07719.02
5.4.170.0070.05319.25
5.4.160.0170.07319.21
5.4.150.0030.08019.04
5.4.140.0100.07316.44
5.4.130.0070.07016.54
5.4.120.0030.07716.46
5.4.110.0130.06716.57
5.4.100.0070.07016.57
5.4.90.0000.08016.49
5.4.80.0100.07316.47
5.4.70.0070.06716.38
5.4.60.0070.08016.52
5.4.50.0000.07316.50
5.4.40.0070.07716.52
5.4.30.0000.07316.53
5.4.20.0000.07716.41
5.4.10.0030.08016.34
5.4.00.0030.07715.88
5.3.290.0000.05314.94
5.3.280.0170.06714.91
5.3.270.0100.07714.86
5.3.260.0030.07714.75
5.3.250.0030.05014.81
5.3.240.0070.05014.94
5.3.230.0130.06014.90
5.3.220.0130.04014.85
5.3.210.0130.03714.70
5.3.200.0070.06314.89
5.3.190.0170.04014.85
5.3.180.0030.06314.73
5.3.170.0030.06714.82
5.3.160.0100.06314.68
5.3.150.0100.04314.86
5.3.140.0100.06714.70
5.3.130.0000.04714.79
5.3.120.0030.05014.76
5.3.110.0070.06314.66
5.3.100.0100.05314.34
5.3.90.0000.04314.23
5.3.80.0100.03714.32
5.3.70.0070.03714.23
5.3.60.0130.07014.20
5.3.50.0030.04314.24
5.3.40.0030.08014.23
5.3.30.0030.07014.22
5.3.20.0070.04313.98
5.3.10.0070.05013.96
5.3.00.0130.04713.96
5.2.170.0030.05011.40
5.2.160.0030.06311.44
5.2.150.0100.06011.22
5.2.140.0070.05311.36
5.2.130.0130.05311.18
5.2.120.0070.05011.16
5.2.110.0100.06011.22
5.2.100.0000.07011.39
5.2.90.0100.03311.30
5.2.80.0030.06311.20
5.2.70.0030.05711.14
5.2.60.0070.06011.36
5.2.50.0030.05711.30
5.2.40.0070.06011.27
5.2.30.0170.05011.22
5.2.20.0100.05311.07
5.2.10.0030.06310.98
5.2.00.0070.05310.84
5.1.60.0070.05310.11
5.1.50.0000.05010.31
5.1.40.0000.04710.30
5.1.30.0000.05010.55
5.1.20.0000.06310.68
5.1.10.0030.05710.13
5.1.00.0100.04010.41
5.0.50.0030.0438.91
5.0.40.0070.0338.91
5.0.30.0030.0678.91
5.0.20.0070.0338.91
5.0.10.0030.0408.91
5.0.00.0030.0438.91
4.4.90.0000.0278.91
4.4.80.0030.0308.91
4.4.70.0000.0378.91
4.4.60.0100.0338.91
4.4.50.0000.0378.91
4.4.40.0070.0538.91
4.4.30.0100.0338.91
4.4.20.0030.0308.91
4.4.10.0030.0338.91
4.4.00.0000.0538.91
4.3.110.0000.0278.91
4.3.100.0000.0238.91
4.3.90.0030.0338.91
4.3.80.0000.0538.91
4.3.70.0000.0308.91
4.3.60.0030.0378.91
4.3.50.0030.0378.91
4.3.40.0000.0508.91
4.3.30.0000.0408.91
4.3.20.0030.0338.91
4.3.10.0030.0278.91
4.3.00.0000.0308.91

preferences:
40.22 ms | 401 KiB | 5 Q