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.0090.00917.09
7.1.60.0140.01119.33
7.1.50.0030.02016.93
7.1.00.0100.06722.57
7.0.200.0040.00416.76
7.0.140.0130.06322.09
7.0.60.0130.07319.93
7.0.50.0070.07717.71
7.0.40.0100.04020.31
7.0.30.0230.04320.20
7.0.20.0270.06020.30
7.0.10.0030.04319.99
7.0.00.0130.06320.16
5.6.280.0070.06720.99
5.6.210.0070.03720.75
5.6.200.0100.04318.12
5.6.190.0070.04020.43
5.6.180.0270.07020.39
5.6.170.0270.08320.46
5.6.160.0030.04020.41
5.6.150.0030.04018.15
5.6.140.0030.07718.08
5.6.130.0130.05718.15
5.6.120.0130.07321.14
5.6.110.0130.06321.00
5.6.100.0070.06321.13
5.6.90.0030.04320.95
5.6.80.0100.03320.37
5.6.70.3100.03020.52
5.5.350.0300.06020.41
5.5.340.0000.04017.98
5.5.330.0100.07320.23
5.5.320.0030.05020.13
5.5.310.0270.07320.21
5.5.300.0200.07017.91
5.5.290.0100.06017.98
5.5.280.0000.05720.76
5.5.270.0070.07720.76
5.5.260.0200.07720.71
5.5.250.0100.03720.78
5.5.240.0330.06720.13
5.4.450.0100.06019.42
5.4.440.1030.06719.41
5.4.430.0470.05319.23
5.4.420.0830.07719.32
5.4.410.0700.07718.99
5.4.400.0770.05719.13
5.4.390.0870.06718.81
5.4.380.0430.05018.53
5.4.370.0200.05718.64
5.4.360.0370.04718.51
5.4.350.0300.05018.77
5.4.340.0130.06718.66
5.4.320.0070.03512.47
5.4.310.0110.03412.46
5.4.300.0080.03712.47
5.4.290.0030.04212.46
5.4.280.0140.05312.34
5.4.270.0070.05812.34
5.4.260.0080.05912.34
5.4.250.0080.05712.33
5.4.240.0090.06212.34
5.4.230.0060.06212.33
5.4.220.0260.09212.33
5.4.210.0200.07812.33
5.4.200.0170.06612.32
5.4.190.0090.04912.32
5.4.180.0120.04712.32
5.4.170.0120.10012.33
5.4.160.0180.09312.33
5.4.150.0090.04912.33
5.4.140.0130.05012.01
5.4.130.0220.10112.00
5.4.120.0150.08411.95
5.4.110.0090.05311.95
5.4.100.0190.09511.95
5.4.90.0110.07811.95
5.4.80.0200.10911.95
5.4.70.0310.08811.95
5.4.60.0090.04811.95
5.4.50.0130.09711.95
5.4.40.0120.08511.94
5.4.30.0110.06511.93
5.4.20.0110.11811.93
5.4.10.0310.10111.93
5.4.00.0080.05411.42
5.3.290.0060.04512.80
5.3.280.0460.12512.71
5.3.270.0230.08112.73
5.3.260.0180.12512.72
5.3.250.0120.13712.72
5.3.240.0150.11912.72
5.3.230.0160.08312.71
5.3.220.0290.10012.68
5.3.210.0140.08512.68
5.3.200.0090.04212.68
5.3.190.0140.05012.68
5.3.180.0120.05112.68
5.3.170.0080.05612.66
5.3.160.0210.11512.67
5.3.150.0270.07312.68
5.3.140.0170.07512.66
5.3.130.0230.12312.66
5.3.120.0230.10612.66
5.3.110.0090.08112.66
5.3.100.0150.06812.12
5.3.90.0130.07312.08
5.3.80.0460.14712.07
5.3.70.0360.09412.07
5.3.60.0200.09412.07
5.3.50.0290.07912.00
5.3.40.0300.09812.00
5.3.30.0090.05611.94
5.3.20.0160.08711.71
5.3.10.0150.10811.68
5.3.00.0090.07811.67
5.2.170.0060.0559.17
5.2.160.0080.0539.17
5.2.150.0100.0929.17
5.2.140.0100.0719.17
5.2.130.0170.0929.13
5.2.120.0270.0839.13
5.2.110.0070.0539.13
5.2.100.0240.0789.13
5.2.90.0140.0439.13
5.2.80.0150.0439.13
5.2.70.0260.0819.12
5.2.60.0110.0499.08
5.2.50.0460.0889.05
5.2.40.0290.1609.02
5.2.30.0100.0429.00
5.2.20.0200.0878.98
5.2.10.0110.0888.93
5.2.00.0170.0878.77
5.1.60.0130.0768.06
5.1.50.0190.0638.05
5.1.40.0150.0588.04
5.1.30.0200.0638.39
5.1.20.0120.0838.41
5.1.10.0130.0508.13
5.1.00.0100.0658.14
5.0.50.0160.0546.61
5.0.40.0180.0686.48
5.0.30.0130.0636.28
5.0.20.0170.0496.25
5.0.10.0050.0636.24
5.0.00.0070.0846.22
4.4.90.0130.0414.78
4.4.80.0120.0474.76
4.4.70.0110.0544.75
4.4.60.0040.0244.76
4.4.50.0030.0244.77
4.4.40.0180.0874.71
4.4.30.0190.0584.76
4.4.20.0180.0374.84
4.4.10.0060.0484.85
4.4.00.0160.0654.76
4.3.110.0020.0254.67
4.3.100.0120.0414.67
4.3.90.0000.0504.64
4.3.80.0080.0364.58
4.3.70.0070.0304.63
4.3.60.0020.0264.63
4.3.50.0130.0414.63
4.3.40.0160.0524.54
4.3.30.0040.0433.29
4.3.20.0070.0603.26
4.3.10.0040.0423.23
4.3.00.0200.01710.30

preferences:
36.61 ms | 401 KiB | 5 Q