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();

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.0030.01515.02
7.3.120.0070.01014.89
7.3.110.0070.01115.09
7.3.100.0030.01015.03
7.3.90.0000.01214.73
7.3.80.0000.01315.10
7.3.70.0100.00314.76
7.3.60.0060.00614.66
7.3.50.0050.00514.86
7.3.40.0070.00314.78
7.3.30.0040.01414.84
7.3.20.0090.00616.71
7.3.10.0030.01016.61
7.3.00.0040.00816.68
7.2.250.0070.01115.23
7.2.240.0060.01015.10
7.2.230.0030.01014.98
7.2.220.0040.01115.00
7.2.210.0090.00915.11
7.2.200.0060.00315.15
7.2.190.0000.01315.15
7.2.180.0120.00414.76
7.2.170.0040.01215.07
7.2.00.0030.01219.48
7.1.330.0080.00615.93
7.1.320.0030.01016.02
7.1.310.0060.00315.72
7.1.300.0060.00615.73
7.1.290.0000.01015.77
7.1.280.0040.01115.63
7.1.270.0030.01315.77
7.1.260.0090.00315.54
7.1.70.0110.00017.38
7.1.60.0000.01017.41
7.1.50.0030.01916.76
7.1.00.0030.07722.55
7.0.200.0030.01316.89
7.0.140.0000.07321.93
7.0.60.0070.08720.02
7.0.50.0100.08017.82
7.0.40.0130.03320.09
7.0.30.0530.06320.12
7.0.20.0300.04720.20
7.0.10.0030.04320.00
7.0.00.0030.05320.05
5.6.280.0030.07021.11
5.6.210.0070.03720.66
5.6.200.0070.05318.20
5.6.190.0030.06020.63
5.6.180.0330.08320.48
5.6.170.0270.08320.33
5.6.160.0170.03020.46
5.6.150.0000.06318.21
5.6.140.0070.06018.14
5.6.130.0100.07718.07
5.6.120.0130.07321.03
5.6.110.0130.03320.89
5.6.100.0030.06721.13
5.6.90.0030.04021.03
5.6.80.0070.07720.48
5.6.70.4470.04020.36
5.5.350.0200.07020.32
5.5.340.0000.04317.92
5.5.330.0230.07320.40
5.5.320.0070.05320.31
5.5.310.0300.07720.28
5.5.300.0100.07017.95
5.5.290.0000.08718.02
5.5.280.0100.08320.75
5.5.270.0070.05020.64
5.5.260.0130.06320.67
5.5.250.0030.04020.68
5.5.240.0300.06720.27
5.4.450.0770.06319.11
5.4.440.0870.05319.10
5.4.430.0130.05019.48
5.4.420.0870.06319.43
5.4.410.0870.07019.19
5.4.400.0630.05719.10
5.4.390.0730.06318.99
5.4.380.0230.05718.70
5.4.370.0230.05018.50
5.4.360.0270.05318.69
5.4.350.0270.05018.56
5.4.340.0330.04718.68
5.4.320.0080.03412.46
5.4.310.0080.04112.46
5.4.300.0050.03812.47
5.4.290.0030.04112.46
5.4.280.0120.04612.34
5.4.270.0100.05212.33
5.4.260.0100.05712.34
5.4.250.0120.05212.34
5.4.240.0110.04712.34
5.4.230.0070.05112.33
5.4.220.0090.04712.33
5.4.210.0070.05412.32
5.4.200.0120.05112.32
5.4.190.0060.05412.32
5.4.180.0120.06012.32
5.4.170.0120.05512.33
5.4.160.0080.05612.33
5.4.150.0110.05412.32
5.4.140.0110.05812.01
5.4.130.0130.06412.00
5.4.120.0120.05211.95
5.4.110.0090.06611.95
5.4.100.0130.08611.95
5.4.90.0080.05211.95
5.4.80.0140.05811.95
5.4.70.0130.05711.95
5.4.60.0110.05511.95
5.4.50.0110.05411.95
5.4.40.0140.05911.93
5.4.30.0150.08511.93
5.4.20.0140.07011.94
5.4.10.0080.03511.94
5.4.00.0060.03611.43
5.3.290.0070.03812.80
5.3.280.0100.03612.71
5.3.270.0110.03912.73
5.3.260.0040.04412.72
5.3.250.0130.04012.72
5.3.240.0070.04112.72
5.3.230.0050.04312.71
5.3.220.0090.04012.68
5.3.210.0060.04512.68
5.3.200.0060.04312.68
5.3.190.0140.04912.68
5.3.180.0230.05112.67
5.3.170.0080.04012.67
5.3.160.0100.03712.67
5.3.150.0050.04412.67
5.3.140.0080.04012.66
5.3.130.0120.03812.66
5.3.120.0120.04112.66
5.3.110.0100.04012.66
5.3.100.0090.03812.12
5.3.90.0050.04112.09
5.3.80.0100.04012.07
5.3.70.0100.06312.08
5.3.60.0130.03712.07
5.3.50.0200.07912.00
5.3.40.0080.04612.00
5.3.30.0120.04411.94
5.3.20.0110.04511.71
5.3.10.0090.04811.68
5.3.00.0060.05611.67
5.2.170.0130.0679.16
5.2.160.0090.0629.17
5.2.150.0210.0959.16
5.2.140.0060.0469.16
5.2.130.0070.0439.13
5.2.120.0080.0429.13
5.2.110.0080.0419.13
5.2.100.0060.0359.13
5.2.90.0060.0329.13
5.2.80.0020.0369.13
5.2.70.0060.0329.13
5.2.60.0050.0399.07
5.2.50.0040.0339.05
5.2.40.0080.0289.02
5.2.30.0060.0329.00
5.2.20.0050.0378.98
5.2.10.0170.0498.93
5.2.00.0110.0418.77
5.1.60.0070.0328.06
5.1.50.0100.0238.06
5.1.40.0120.0428.05
5.1.30.0060.0278.39
5.1.20.0040.0298.42
5.1.10.0120.0268.14
5.1.00.0100.0438.14
5.0.50.0080.0266.62
5.0.40.0180.0516.48
5.0.30.0040.0426.29
5.0.20.0060.0266.26
5.0.10.0060.0286.24
5.0.00.0070.0416.23
4.4.90.0110.0464.78
4.4.80.0070.0394.75
4.4.70.0060.0384.75
4.4.60.0230.0534.75
4.4.50.0090.0394.77
4.4.40.0040.0344.71
4.4.30.0060.0194.76
4.4.20.0050.0614.84
4.4.10.0110.0364.85
4.4.00.0200.0534.76
4.3.110.0100.0314.67
4.3.100.0060.0194.67
4.3.90.0030.0164.63
4.3.80.0070.0264.58
4.3.70.0130.0684.63
4.3.60.0030.0344.63
4.3.50.0020.0274.63
4.3.40.0060.0594.53
4.3.30.0040.0233.29
4.3.20.0020.0393.27
4.3.10.0020.0283.23
4.3.00.0100.01310.30

preferences:
37.76 ms | 400 KiB | 5 Q