3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max = 1000; $arr = array_fill(0, $max, 1); $mem = memory_get_usage(true); $count = 0; foreach ($arr as $key => $val) { $count ++; $arr[$max+1] = 9999; } echo $count.': '.memory_get_usage(true)-$mem;

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.0060.00619.59
7.1.70.0050.00217.19
7.1.60.0040.02119.33
7.1.50.0080.00616.87
7.1.00.0070.06322.28
7.0.200.0000.01016.80
7.0.140.0130.06321.95
7.0.60.0130.08019.97
7.0.50.0030.04017.92
7.0.40.0070.08720.04
7.0.30.0400.05720.17
7.0.20.0270.06320.18
7.0.10.0070.08320.18
7.0.00.0100.05720.12
5.6.280.0030.07321.11
5.6.210.0030.07720.65
5.6.200.0070.03718.18
5.6.190.0030.05320.26
5.6.180.0300.04720.40
5.6.170.0200.07020.48
5.6.160.0000.04720.33
5.6.150.0000.04318.20
5.6.140.0100.08018.25
5.6.130.0070.03718.09
5.6.120.0130.07721.07
5.6.110.0100.08021.11
5.6.100.0070.07321.07
5.6.90.0100.07720.97
5.6.80.0100.07720.41
5.6.70.4270.03320.40
5.5.350.0130.08320.37
5.5.340.0030.05018.02
5.5.330.0030.04720.20
5.5.320.0030.08720.26
5.5.310.0230.08020.20
5.5.300.0000.09017.97
5.5.290.0130.03017.92
5.5.280.0070.07320.70
5.5.270.0030.04020.79
5.5.260.0130.08020.82
5.5.250.0200.07020.72
5.5.240.0230.07020.26
5.4.450.0830.06019.14
5.4.440.0930.04719.45
5.4.430.0630.05719.24
5.4.420.0630.06019.44
5.4.410.0630.06319.41
5.4.400.0430.05719.13
5.4.390.0100.05718.82
5.4.380.0370.05718.63
5.4.370.0270.05018.64
5.4.360.0170.05018.67
5.4.350.0170.05018.89
5.4.340.0230.06018.85
5.4.320.0070.05312.64
5.4.310.0070.03712.63
5.4.300.0070.03512.64
5.4.290.0060.03912.63
5.4.280.0100.03412.50
5.4.270.0070.03912.50
5.4.260.0110.03712.50
5.4.250.0080.03912.50
5.4.240.0060.04012.50
5.4.230.0090.04012.49
5.4.220.0130.05312.50
5.4.210.0030.04012.50
5.4.200.0130.04112.50
5.4.190.0070.03812.49
5.4.180.0090.03812.49
5.4.170.0130.04912.50
5.4.160.0090.04712.50
5.4.150.0120.06412.50
5.4.140.0100.04412.18
5.4.130.0120.04612.17
5.4.120.0100.04812.13
5.4.110.0090.04612.12
5.4.100.0070.04912.12
5.4.90.0090.04912.12
5.4.80.0150.06612.12
5.4.70.0140.05112.11
5.4.60.0110.04512.11
5.4.50.0140.04812.12
5.4.40.0100.04512.11
5.4.30.0120.04412.11
5.4.20.0240.09412.11
5.4.10.0070.04512.10
5.4.00.0130.05411.60
5.3.290.0070.04112.89
5.3.280.0130.04712.80
5.3.270.0100.04512.81
5.3.260.0080.05412.81
5.3.250.0040.04612.81
5.3.240.0100.05212.81
5.3.230.0100.04912.80
5.3.220.0110.03912.77
5.3.210.0070.05512.77
5.3.200.0230.05712.77
5.3.190.0130.04612.77
5.3.180.0080.05212.77
5.3.170.0090.03912.77
5.3.160.0070.04412.77
5.3.150.0140.04712.77
5.3.140.0070.04312.76
5.3.130.0220.04412.75
5.3.120.0060.04512.75
5.3.110.0100.04012.75
5.3.100.0050.04412.24
5.3.90.0080.04012.22
5.3.80.0090.03812.20
5.3.70.0100.03712.21
5.3.60.0090.03712.19
5.3.50.0070.04012.14
5.3.40.0070.04012.14
5.3.30.0110.04512.10
5.3.20.0140.04311.88
5.3.10.0060.03611.84
5.3.00.0080.03611.84
5.2.170.0050.0349.34
5.2.160.0060.0319.33
5.2.150.0060.0349.33
5.2.140.0060.0329.33
5.2.130.0060.0299.29
5.2.120.0060.0279.29
5.2.110.0050.0309.30
5.2.100.0050.0309.30
5.2.90.0070.0299.29
5.2.80.0050.0349.29
5.2.70.0080.0319.29
5.2.60.0080.0489.24
5.2.50.0090.0439.21
5.2.40.0080.0739.18
5.2.30.0080.0439.17
5.2.20.0140.0349.16
5.2.10.0110.0629.10
5.2.00.0140.0508.85
5.1.60.0090.0428.16
5.1.50.0070.0438.16
5.1.40.0050.0388.14
5.1.30.0090.0388.48
5.1.20.0100.0438.51
5.1.10.0040.0398.23
5.1.00.0140.0478.23
5.0.50.0080.0436.71
5.0.40.0110.0406.57
5.0.30.0060.0416.38
5.0.20.0040.0276.36
5.0.10.0070.0286.34
5.0.00.0050.0476.32
4.4.90.0130.0314.77
4.4.80.0040.0504.75
4.4.70.0120.0284.76
4.4.60.0120.0444.75
4.4.50.0110.0414.77
4.4.40.0110.0454.72
4.4.30.0120.0364.76
4.4.20.0110.0484.84
4.4.10.0100.0364.85
4.4.00.0100.0534.76
4.3.110.0070.0194.67
4.3.100.0080.0424.66
4.3.90.0060.0284.63
4.3.80.0040.0354.63
4.3.70.0030.0214.63
4.3.60.0030.0214.63
4.3.50.0040.0234.63
4.3.40.0070.0324.58
4.3.30.0020.0243.39
4.3.20.0040.0223.36
4.3.10.0050.0213.32
4.3.00.0030.01010.30

preferences:
28.78 ms | 401 KiB | 5 Q