3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max = 100; $arr = array_fill(0, $max, 1); $mem = memory_get_usage(true); foreach ($arr as $key=>&$val) { $arr[$max+1] = 9999; } echo 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.1.70.0070.00717.20
7.1.60.0090.01519.33
7.1.50.0100.01016.96
7.1.00.0030.08022.37
7.0.200.0000.01416.95
7.0.140.0070.07022.17
7.0.60.0030.09019.81
7.0.50.0100.08017.86
7.0.40.0030.05719.96
7.0.30.0430.06020.00
7.0.20.0170.05019.99
7.0.10.0100.03720.20
7.0.00.0100.08720.00
5.6.280.0030.07320.98
5.6.210.0100.03320.65
5.6.200.0030.08018.22
5.6.190.0070.08720.27
5.6.180.0270.04320.61
5.6.170.0530.06320.42
5.6.160.0000.04320.50
5.6.150.0030.04018.23
5.6.140.0100.07718.12
5.6.130.0070.07318.21
5.6.120.0100.06721.13
5.6.110.0170.07720.93
5.6.100.0100.06720.98
5.6.90.0070.04321.01
5.6.80.0070.03320.38
5.6.70.3730.04720.52
5.5.350.0130.04020.30
5.5.340.0100.03317.97
5.5.330.0030.09020.21
5.5.320.0000.05720.51
5.5.310.0170.06020.28
5.5.300.0030.04318.02
5.5.290.0030.08317.95
5.5.280.0170.07320.84
5.5.270.0070.08320.84
5.5.260.0100.07020.84
5.5.250.0070.05020.54
5.5.240.0330.05320.26
5.4.450.0830.05319.57
5.4.440.0630.06019.61
5.4.430.0070.05719.63
5.4.420.0670.05719.27
5.4.410.0700.05319.39
5.4.400.0800.05719.09
5.4.390.0670.05319.20
5.4.380.0430.05318.62
5.4.370.0300.05318.53
5.4.360.0230.05018.56
5.4.350.0330.04718.64
5.4.340.0300.04718.74
5.4.320.0110.03212.46
5.4.310.0060.03812.46
5.4.300.0070.03612.46
5.4.290.0050.03812.46
5.4.280.0150.06212.33
5.4.270.0190.05812.33
5.4.260.0290.06312.33
5.4.250.0110.06512.33
5.4.240.0180.06112.33
5.4.230.0150.08112.32
5.4.220.0100.05412.32
5.4.210.0140.05112.32
5.4.200.0080.04912.32
5.4.190.0110.05312.32
5.4.180.0100.05812.32
5.4.170.0190.05712.33
5.4.160.0070.03912.33
5.4.150.0140.04812.32
5.4.140.0130.03612.00
5.4.130.0060.05512.00
5.4.120.0140.05011.95
5.4.110.0110.03811.95
5.4.100.0130.03911.95
5.4.90.0070.06011.95
5.4.80.0080.04011.95
5.4.70.0060.04111.95
5.4.60.0070.03911.95
5.4.50.0060.04211.94
5.4.40.0130.04811.93
5.4.30.0100.05311.93
5.4.20.0090.03811.93
5.4.10.0100.03811.93
5.4.00.0060.04111.42
5.3.290.0100.04212.80
5.3.280.0100.04312.71
5.3.270.0120.04112.73
5.3.260.0080.04312.72
5.3.250.0090.04412.72
5.3.240.0100.03812.71
5.3.230.0100.04012.70
5.3.220.0070.04112.68
5.3.210.0090.04212.68
5.3.200.0080.04012.68
5.3.190.0100.03812.68
5.3.180.0100.04012.67
5.3.170.0070.04012.67
5.3.160.0150.05712.68
5.3.150.0160.06012.68
5.3.140.0150.03812.66
5.3.130.0070.04312.66
5.3.120.0320.04312.66
5.3.110.0280.09912.66
5.3.100.0090.03912.12
5.3.90.0080.04112.09
5.3.80.0080.05212.07
5.3.70.0090.04512.07
5.3.60.0040.04412.06
5.3.50.0110.03612.00
5.3.40.0070.04112.00
5.3.30.0090.03611.94
5.3.20.0090.04111.71
5.3.10.0120.04511.68
5.3.00.0080.03911.67
5.2.170.0040.0359.16
5.2.160.0190.0679.16
5.2.150.0030.0379.16
5.2.140.0080.0429.16
5.2.130.0190.0599.12
5.2.120.0090.0479.12
5.2.110.0050.0429.12
5.2.100.0110.0629.12
5.2.90.0110.0549.13
5.2.80.0120.0579.12
5.2.70.0120.0409.12
5.2.60.0070.0329.07
5.2.50.0060.0419.04
5.2.40.0090.0309.01
5.2.30.0080.0339.00
5.2.20.0070.0308.98
5.2.10.0050.0448.93
5.2.00.0080.0308.77
5.1.60.0040.0278.05
5.1.50.0040.0298.06
5.1.40.0050.0308.04
5.1.30.0070.0328.39
5.1.20.0200.0688.41
5.1.10.0100.0378.13
5.1.00.0050.0288.13
5.0.50.0050.0226.61
5.0.40.0040.0216.48
5.0.30.0050.0366.28
5.0.20.0080.0176.25
5.0.10.0030.0236.23
5.0.00.0040.0336.23
4.4.90.0050.0164.78
4.4.80.0050.0154.75
4.4.70.0040.0174.75
4.4.60.0040.0164.75
4.4.50.0040.0174.77
4.4.40.0020.0284.71
4.4.30.0040.0164.76
4.4.20.0050.0194.84
4.4.10.0050.0164.85
4.4.00.0010.0294.76
4.3.110.0040.0164.67
4.3.100.0030.0164.66
4.3.90.0040.0154.63
4.3.80.0030.0264.58
4.3.70.0030.0164.63
4.3.60.0060.0144.63
4.3.50.0040.0174.63
4.3.40.0030.0284.54
4.3.30.0000.0193.28
4.3.20.0080.0173.26
4.3.10.0050.0183.23
4.3.00.0200.01310.30

preferences:
33.97 ms | 400 KiB | 5 Q