3v4l.org

run code in 300+ PHP versions simultaneously
<?php // For inline $results = []; $aHash = []; $i = 0; $tmp = ''; while ($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); $t = microtime(true); $key = array_keys($aHash); $size = count($key); for ($i = 0; $i < $size; $i++) $aHash[$key[$i]] .= "a"; echo (microtime(true) - $t) * 1000000;

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.2.00.0000.01019.45
7.1.70.0000.00716.96
7.1.60.0130.01319.33
7.1.50.0220.00634.84
7.1.00.0100.06722.33
7.0.200.0000.00816.86
7.0.140.0000.07722.07
7.0.60.0070.08020.00
7.0.50.0030.04017.91
7.0.40.0030.04320.20
7.0.30.0370.04020.01
7.0.20.0270.04320.44
7.0.10.0070.05020.12
7.0.00.0070.04020.09
5.6.280.0100.07021.77
5.6.210.0130.05021.57
5.6.200.0170.07718.92
5.6.190.0130.08321.29
5.6.180.0330.07021.29
5.6.170.0270.07321.20
5.6.160.0070.08321.27
5.6.150.0070.06718.98
5.6.140.0130.07318.97
5.6.130.0030.04018.91
5.6.120.0100.08321.93
5.6.110.0230.07321.88
5.6.100.0100.08021.87
5.6.90.0100.08322.01
5.6.80.0070.03721.39
5.6.70.4430.03321.41
5.5.350.0130.08021.29
5.5.340.0070.08318.80
5.5.330.0170.04021.05
5.5.320.0470.07021.12
5.5.310.0230.06721.09
5.5.300.0100.07718.86
5.5.290.0070.06718.83
5.5.280.0130.06721.64
5.5.270.0100.08321.65
5.5.260.0100.07021.63
5.5.250.0130.08021.54
5.5.240.0230.05021.19
5.4.450.0770.06320.04
5.4.440.0870.06020.14
5.4.430.0230.06320.29
5.4.420.0670.00019.88
5.4.410.0130.05319.52
5.4.400.0200.06319.53
5.4.390.0230.04719.45
5.4.380.0170.06019.41
5.4.370.0230.05019.38
5.4.360.0170.06319.28
5.4.350.0060.03712.77
5.4.340.0080.03512.77
5.4.320.0060.03913.25
5.4.310.0080.03713.25
5.4.300.0090.04113.26
5.4.290.0050.04013.24
5.4.280.0100.05113.12
5.4.270.0150.04813.12
5.4.260.0160.04913.12
5.4.250.0150.05013.12
5.4.240.0100.05413.13
5.4.230.0120.05213.11
5.4.220.0110.05313.11
5.4.210.0110.05313.11
5.4.200.0120.05313.11
5.4.190.0140.05013.11
5.4.180.0140.05213.11
5.4.170.0130.05213.12
5.4.160.0120.05313.12
5.4.150.0120.05113.11
5.4.140.0110.05512.80
5.4.130.0110.05312.78
5.4.120.0130.05312.74
5.4.110.0100.05212.73
5.4.100.0070.05512.74
5.4.90.0090.05712.73
5.4.80.0070.05912.73
5.4.70.0130.05212.73
5.4.60.0070.05612.73
5.4.50.0140.05412.73
5.4.40.0110.05512.73
5.4.30.0130.05212.72
5.4.20.0110.05112.72
5.4.10.0060.05312.72
5.4.00.0100.05312.21
5.3.290.0090.03612.80
5.3.280.0120.04812.71
5.3.270.0100.05712.72
5.3.260.0100.05312.72
5.3.250.0120.04812.72
5.3.240.0100.05312.72
5.3.230.0110.05312.71
5.3.220.0120.05612.68
5.3.210.0110.05212.68
5.3.200.0170.04712.68
5.3.190.0120.04812.68
5.3.180.0060.05712.67
5.3.170.0110.05212.66
5.3.160.0110.05312.67
5.3.150.0130.05312.67
5.3.140.0130.05412.66
5.3.130.0140.05412.66
5.3.120.0150.05112.66
5.3.110.0090.05712.66
5.3.100.0170.04512.12
5.3.90.0200.04512.09
5.3.80.0100.05012.08
5.3.70.0130.04612.07
5.3.60.0120.03912.06
5.3.50.0110.04812.00
5.3.40.0120.05212.00
5.3.30.0080.05411.94
5.3.20.0110.06311.70
5.3.10.0100.04811.67
5.3.00.0100.05211.66
5.2.170.0070.0469.15
5.2.160.0080.0419.15
5.2.150.0060.0359.15
5.2.140.0070.0329.15
5.2.130.0110.0469.11
5.2.120.0080.0439.11
5.2.110.0090.0379.11
5.2.100.0050.0369.11
5.2.90.0070.0379.11
5.2.80.0050.0379.11
5.2.70.0090.0299.11
5.2.60.0060.0419.05
5.2.50.0120.0599.03
5.2.40.0100.0369.00
5.2.30.0070.0678.99
5.2.20.0160.0548.97
5.2.10.0080.0458.90
5.2.00.0050.0318.77
5.1.60.0050.0348.04
5.1.50.0060.0398.04
5.1.40.0100.0388.03
5.1.30.0110.0398.38
5.1.20.0050.0478.40
5.1.10.0110.0628.12
5.1.00.0130.0358.13
5.0.50.0060.0286.60
5.0.40.0050.0276.46
5.0.30.0080.0566.27
5.0.20.0070.0266.25
5.0.10.0090.0216.21
5.0.00.0050.0336.21
4.4.90.0050.0214.78
4.4.80.0040.0184.75
4.4.70.0100.0484.75
4.4.60.0020.0284.75
4.4.50.0040.0444.77
4.4.40.0030.0354.71
4.4.30.0020.0224.76
4.4.20.0030.0344.84
4.4.10.0020.0264.84
4.4.00.0070.0334.76
4.3.110.0030.0244.67
4.3.100.0070.0184.66
4.3.90.0050.0204.63
4.3.80.0030.0344.58
4.3.70.0050.0204.63
4.3.60.0040.0144.63
4.3.50.0030.0174.63
4.3.40.0020.0264.54
4.3.30.0000.0193.27
4.3.20.0030.0163.25
4.3.10.0020.0173.22
4.3.00.0200.0208.09

preferences:
28.94 ms | 401 KiB | 5 Q