3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NullKeyIterator extends \ArrayIterator { public function key() { return 3.22; } } $iterator = new NullKeyIterator(range(1,10)); foreach($iterator as $key => $value) { var_dump($key, $value); }

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)
8.3.40.0120.00918.84
8.3.30.0120.00319.09
8.3.20.0050.00320.26
8.3.10.0040.00423.61
8.3.00.0040.00419.38
8.2.170.0070.00722.96
8.2.160.0070.00720.43
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0080.00022.11
8.2.110.0060.00321.99
8.2.100.0090.00317.91
8.2.90.0060.00319.17
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0030.00519.88
8.2.30.0000.00719.98
8.2.20.0030.00617.74
8.2.10.0050.00317.94
8.2.00.0040.00817.68
8.1.270.0050.00323.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00424.01
8.1.230.0040.00819.18
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0000.00917.35
8.1.190.0050.00317.13
8.1.180.0040.00418.10
8.1.170.0050.00318.68
8.1.160.0000.00722.01
8.1.150.0000.00918.64
8.1.140.0000.00817.46
8.1.130.0050.00317.83
8.1.120.0080.00017.41
8.1.110.0070.00017.35
8.1.100.0070.00017.44
8.1.90.0070.00017.48
8.1.80.0000.00717.31
8.1.70.0030.00617.40
8.1.60.0060.00317.58
8.1.50.0040.00417.45
8.1.40.0000.00717.55
8.1.30.0040.00417.63
8.1.20.0080.00017.48
8.1.10.0040.00417.53
8.1.00.0040.00417.52
8.0.300.0040.00420.73
8.0.290.0070.00017.15
8.0.280.0070.00018.51
8.0.270.0040.00417.30
8.0.260.0030.00317.24
8.0.250.0000.00716.89
8.0.240.0000.00716.94
8.0.230.0000.00716.90
8.0.220.0040.00416.91
8.0.210.0060.00316.78
8.0.200.0030.00316.91
8.0.190.0000.00816.90
8.0.180.0000.00716.82
8.0.170.0040.00416.89
8.0.160.0000.01016.99
8.0.150.0040.00416.74
8.0.140.0080.00016.82
8.0.130.0030.00313.33
8.0.120.0040.00416.76
8.0.110.0000.00716.86
8.0.100.0040.00416.84
8.0.90.0000.00717.01
8.0.80.0150.00016.88
8.0.70.0040.00416.96
8.0.60.0050.00316.91
8.0.50.0070.00017.00
8.0.30.0140.00517.21
8.0.20.0090.01017.40
8.0.10.0070.00016.91
8.0.00.0110.00916.72
7.4.330.0000.00615.10
7.4.320.0060.00016.62
7.4.300.0000.00616.64
7.4.290.0040.00416.61
7.4.280.0050.00516.44
7.4.270.0080.00016.49
7.4.260.0070.00016.49
7.4.250.0030.00516.52
7.4.240.0020.00516.52
7.4.230.0000.00716.36
7.4.220.0130.00616.63
7.4.210.0090.00516.56
7.4.200.0030.00316.61
7.4.190.0030.00516.76
7.4.160.0100.01316.42
7.4.150.0080.01117.40
7.4.140.0090.00817.86
7.4.130.0070.01116.49
7.4.120.0120.00616.54
7.4.110.0170.00016.31
7.4.100.0130.00616.36
7.4.90.0170.00316.65
7.4.80.0100.00919.39
7.4.70.0030.02016.32
7.4.60.0080.00816.54
7.4.50.0040.00416.26
7.4.40.0000.01822.77
7.4.30.0090.00616.63
7.4.00.0030.01315.12
7.3.330.0000.00513.33
7.3.320.0000.00513.38
7.3.310.0040.00416.26
7.3.300.0080.00016.32
7.3.290.0060.00916.37
7.3.280.0050.01416.31
7.3.270.0110.00617.40
7.3.260.0170.00016.36
7.3.250.0080.01216.50
7.3.240.0120.00916.36
7.3.230.0060.01216.41
7.3.210.0070.01116.55
7.3.200.0130.00919.39
7.3.190.0060.01216.39
7.3.180.0120.00416.33
7.3.170.0070.01016.65
7.3.160.0080.00816.58
7.3.120.0090.00514.74
7.3.110.0030.01414.97
7.3.100.0100.00314.80
7.3.90.0030.01414.96
7.3.80.0030.00914.79
7.3.70.0070.00714.98
7.3.60.0040.00814.91
7.3.50.0070.01014.98
7.3.40.0030.01014.49
7.3.30.0040.00414.90
7.3.20.0040.00916.64
7.3.10.0000.01516.82
7.3.00.0060.00616.77
7.2.330.0130.00716.55
7.2.320.0030.01416.69
7.2.310.0060.01016.50
7.2.300.0030.01916.52
7.2.290.0100.01016.43
7.2.250.0080.00814.80
7.2.240.0130.00714.95
7.2.230.0000.01815.21
7.2.220.0030.01015.02
7.2.210.0090.00615.11
7.2.200.0030.00714.70
7.2.190.0090.00614.87
7.2.180.0030.01015.15
7.2.170.0110.00614.95
7.2.00.0000.01419.29
7.1.330.0090.00615.63
7.1.320.0070.00715.82
7.1.310.0070.00715.39
7.1.300.0120.00615.63
7.1.290.0070.00715.91
7.1.280.0000.01615.71
7.1.270.0000.01415.89
7.1.260.0040.00715.97
7.1.100.0000.01318.11
7.1.70.0000.00717.00
7.1.60.0130.01319.46
7.1.50.0090.01816.51
7.1.00.0070.07322.51
7.0.200.0040.00416.63
7.0.140.0000.07722.18
7.0.60.0100.08319.92
7.0.50.0100.08317.83
7.0.40.0130.07020.20
7.0.30.0470.06720.13
7.0.20.0330.07720.17
7.0.10.0170.04720.20
7.0.00.0070.09320.25
5.6.280.0000.07720.90
5.6.210.0130.06020.75
5.6.200.0130.06718.23
5.6.190.0000.04720.41
5.6.180.0470.07720.77
5.6.170.0170.04320.48
5.6.160.0130.06720.46
5.6.150.0070.08018.18
5.6.140.0100.07718.29
5.6.130.0070.03718.15
5.6.120.0130.07021.10
5.6.110.0070.05021.05
5.6.100.0230.07020.98
5.6.90.0030.09020.99
5.6.80.0000.08020.51
5.6.70.3100.03320.38
5.5.350.0030.09020.35
5.5.340.0070.07717.99
5.5.330.0100.08720.37
5.5.320.0300.04320.38
5.5.310.0230.08020.37
5.5.300.0070.04718.02
5.5.290.0070.03717.92
5.5.280.0070.08320.80
5.5.270.0130.08020.97
5.5.260.0030.07720.96
5.5.250.0100.07320.62
5.5.240.0070.08320.16
5.4.450.0170.05019.44
5.4.440.0700.05019.33
5.4.430.0130.05019.38
5.4.420.0030.06019.54
5.4.410.0070.06019.40
5.4.400.0070.06019.07
5.4.390.0300.03319.16
5.4.380.0330.04718.79
5.4.370.0370.05018.89
5.4.360.0200.06718.74
5.4.350.0300.05718.83
5.4.340.0300.05318.70
5.4.320.0090.03512.51
5.4.310.0050.04612.50
5.4.300.0040.04012.51
5.4.290.0080.05412.50
5.4.280.0060.05312.39
5.4.270.0050.04512.39
5.4.260.0160.06112.40
5.4.250.0100.04312.39
5.4.240.0100.03712.39
5.4.230.0100.03812.39
5.4.220.0040.04112.38
5.4.210.0080.03712.38
5.4.200.0100.03812.39
5.4.190.0080.03512.38
5.4.180.0110.04412.38
5.4.170.0100.05112.40
5.4.160.0070.05112.39
5.4.150.0080.04912.39
5.4.140.0230.06212.07
5.4.130.0070.05512.06
5.4.120.0070.05912.02
5.4.110.0110.04912.01
5.4.100.0090.04812.02
5.4.90.0150.04512.01
5.4.80.0120.04812.02
5.4.70.0140.06512.01
5.4.60.0070.05112.01
5.4.50.0080.05112.01
5.4.40.0070.04112.00
5.4.30.0090.04611.99
5.4.20.0080.04911.99
5.4.10.0110.03711.99
5.4.00.0150.03311.48
5.3.290.0050.04712.80
5.3.280.0080.04012.71
5.3.270.0040.04512.72
5.3.260.0080.04012.72
5.3.250.0160.05112.71
5.3.240.0090.05012.72
5.3.230.0050.05212.71
5.3.220.0260.05312.68
5.3.210.0060.05912.68
5.3.200.0130.05012.68
5.3.190.0120.08112.68
5.3.180.0110.05012.67
5.3.170.0070.08112.67
5.3.160.0090.07612.68
5.3.150.0110.06612.67
5.3.140.0090.05512.66
5.3.130.0130.05912.66
5.3.120.0110.06112.66
5.3.110.0140.05412.66
5.3.100.0100.06712.13
5.3.90.0100.06312.11
5.3.80.0070.06212.11
5.3.70.0120.05812.10
5.3.60.0110.05812.09
5.3.50.0090.06012.05
5.3.40.0110.05612.04
5.3.30.0170.06212.00
5.3.20.0120.05011.77
5.3.10.0070.05211.74
5.3.00.0100.05011.73
5.2.170.0080.0339.22
5.2.160.0060.0449.22
5.2.150.0070.0379.22
5.2.140.0040.0339.21
5.2.130.0070.0319.18
5.2.120.0070.0369.18
5.2.110.0050.0339.19
5.2.100.0040.0319.18
5.2.90.0090.0299.18
5.2.80.0130.0399.18
5.2.70.0090.0399.18
5.2.60.0060.0439.13
5.2.50.0050.0339.10
5.2.40.0050.0329.07
5.2.30.0000.0399.05
5.2.20.0050.0329.04
5.2.10.0070.0378.94
5.2.00.0100.0388.81
5.1.60.0100.0318.09
5.1.50.0060.0348.09
5.1.40.0040.0328.07
5.1.30.0040.0428.42
5.1.20.0040.0338.44
5.1.10.0080.0358.17
5.1.00.0070.0368.17
5.0.50.0050.0276.64
5.0.40.0050.0276.50
5.0.30.0060.0466.31
5.0.20.0040.0276.30
5.0.10.0080.0266.28
5.0.00.0050.0436.27
4.4.90.0030.0244.78
4.4.80.0040.0234.76
4.4.70.0020.0244.75
4.4.60.0040.0234.75
4.4.50.0070.0194.77
4.4.40.0020.0364.71
4.4.30.0030.0234.76
4.4.20.0030.0234.85
4.4.10.0060.0204.85
4.4.00.0010.0364.76
4.3.110.0040.0224.67
4.3.100.0010.0254.66
4.3.90.0030.0214.64
4.3.80.0030.0294.58
4.3.70.0030.0164.63
4.3.60.0010.0174.63
4.3.50.0030.0234.63
4.3.40.0070.0244.54
4.3.30.0040.0153.30
4.3.20.0030.0193.28
4.3.10.0000.0203.23
4.3.00.0070.0307.19

preferences:
32.49 ms | 400 KiB | 5 Q