3v4l.org

run code in 300+ PHP versions simultaneously
<?php class NullKeyIterator extends \ArrayIterator { public function key() { return new stdClass(); } } $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.60.0110.00416.63
8.3.50.0230.00921.97
8.3.40.0070.00718.88
8.3.30.0090.00619.00
8.3.20.0070.00020.34
8.3.10.0040.00423.62
8.3.00.0080.00019.25
8.2.180.0100.01018.29
8.2.170.0090.00622.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.01226.16
8.2.120.0040.00422.21
8.2.110.0060.00322.25
8.2.100.0090.00317.66
8.2.90.0000.00819.26
8.2.80.0030.00618.05
8.2.70.0060.00317.25
8.2.60.0070.00717.67
8.2.50.0050.00318.07
8.2.40.0050.00319.97
8.2.30.0060.00319.80
8.2.20.0030.00517.59
8.2.10.0040.00417.93
8.2.00.0110.00017.72
8.1.280.0110.00425.92
8.1.270.0080.00023.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01223.92
8.1.230.0040.00719.10
8.1.220.0000.00817.75
8.1.210.0060.00318.77
8.1.200.0090.00017.36
8.1.190.0080.00017.63
8.1.180.0060.00318.10
8.1.170.0030.00518.57
8.1.160.0040.00422.02
8.1.150.0030.00918.51
8.1.140.0000.00717.50
8.1.130.0080.00019.23
8.1.120.0030.00417.36
8.1.110.0000.00817.37
8.1.100.0030.00517.35
8.1.90.0000.00817.43
8.1.80.0050.00317.35
8.1.70.0000.00717.39
8.1.60.0090.00017.57
8.1.50.0040.00417.55
8.1.40.0040.00417.55
8.1.30.0030.00517.60
8.1.20.0050.00217.54
8.1.10.0040.00417.60
8.1.00.0070.00017.51
8.0.300.0050.00319.21
8.0.290.0040.00417.16
8.0.280.0000.00718.45
8.0.270.0040.00417.21
8.0.260.0040.00416.72
8.0.250.0070.00016.85
8.0.240.0030.00316.91
8.0.230.0000.00716.94
8.0.220.0070.00016.96
8.0.210.0090.00016.89
8.0.200.0030.00316.99
8.0.190.0000.00816.82
8.0.180.0000.00716.79
8.0.170.0040.00416.94
8.0.160.0000.00716.83
8.0.150.0040.00416.79
8.0.140.0050.00316.90
8.0.130.0060.00013.36
8.0.120.0040.00416.75
8.0.110.0080.00016.80
8.0.100.0040.00416.70
8.0.90.0040.00416.93
8.0.80.0060.00916.86
8.0.70.0000.00716.89
8.0.60.0000.00716.80
8.0.50.0070.00016.80
8.0.30.0110.00817.09
8.0.20.0110.01017.40
8.0.10.0000.00816.80
8.0.00.0090.00916.66
7.4.330.0000.00515.20
7.4.320.0060.00016.43
7.4.300.0030.00316.59
7.4.290.0030.00316.59
7.4.280.0090.00016.60
7.4.270.0030.00316.52
7.4.260.0070.00016.35
7.4.250.0030.00516.48
7.4.240.0050.00216.51
7.4.230.0000.00716.59
7.4.220.0060.01216.68
7.4.210.0080.00916.57
7.4.200.0070.00016.60
7.4.190.0040.00416.38
7.4.160.0100.00716.32
7.4.150.0100.01017.40
7.4.140.0100.00617.86
7.4.130.0130.00516.51
7.4.120.0120.00516.45
7.4.110.0160.00616.44
7.4.100.0150.00616.54
7.4.90.0060.01116.48
7.4.80.0120.00619.39
7.4.70.0110.01116.64
7.4.60.0040.01816.58
7.4.50.0040.00416.21
7.4.40.0090.00322.77
7.4.30.0080.00816.61
7.4.00.0080.00815.09
7.3.330.0000.00513.30
7.3.320.0050.00013.24
7.3.310.0070.00016.41
7.3.300.0030.00316.30
7.3.290.0040.01116.25
7.3.280.0090.01116.29
7.3.270.0090.00917.40
7.3.260.0070.01416.54
7.3.250.0140.00616.38
7.3.240.0140.00716.35
7.3.230.0000.01716.59
7.3.210.0080.00816.29
7.3.200.0030.01919.39
7.3.190.0070.01016.30
7.3.180.0040.01216.53
7.3.170.0030.01216.57
7.3.160.0030.01316.68
7.3.120.0070.01014.63
7.3.110.0090.00914.59
7.3.100.0030.00914.71
7.3.90.0120.00014.68
7.3.80.0040.00914.67
7.3.70.0040.00914.64
7.3.60.0080.00614.84
7.3.50.0070.00314.88
7.3.40.0030.01014.85
7.3.30.0070.00714.71
7.3.20.0130.00316.67
7.3.10.0030.01216.40
7.3.00.0050.00716.38
7.2.330.0090.00916.73
7.2.320.0060.01116.68
7.2.310.0120.00916.61
7.2.300.0130.00316.52
7.2.290.0090.00916.46
7.2.240.0120.00315.28
7.2.230.0040.01214.89
7.2.220.0090.00915.00
7.2.210.0060.00915.17
7.2.200.0040.01114.80
7.2.190.0070.00715.04
7.2.180.0100.00015.14
7.2.170.0100.00714.93
7.2.160.0070.01015.00
7.2.150.0070.01016.58
7.2.140.0060.00916.99
7.2.130.0030.00517.03
7.2.120.0020.01217.03
7.2.110.0060.00617.00
7.2.100.0070.00716.98
7.2.90.0100.00816.88
7.2.80.0110.00316.78
7.2.70.0000.01116.88
7.2.60.0060.00816.88
7.2.50.0000.01716.65
7.2.40.0060.00816.98
7.2.30.0060.00616.81
7.2.20.0080.00716.78
7.2.10.0080.00816.84
7.2.00.0020.01117.71
7.1.330.0000.01515.86
7.1.320.0110.00815.94
7.1.310.0070.00715.97
7.1.300.0000.01015.63
7.1.290.0000.01215.40
7.1.280.0090.00615.49
7.1.270.0060.00315.93
7.1.260.0000.01415.94
7.1.250.0050.00615.69
7.1.100.0080.00017.90
7.1.70.0030.00616.79
7.1.60.0070.01519.46
7.1.50.0220.01634.82
7.1.00.0070.06722.50
7.0.200.0000.00716.61
7.0.140.0100.06322.00
7.0.60.0070.08019.88
7.0.50.0030.07017.86
7.0.40.0030.05020.09
7.0.30.0130.04720.09
7.0.20.0200.07720.08
7.0.10.0030.04320.15
7.0.00.0000.04320.05
5.6.280.0030.07020.87
5.6.210.0070.06720.65
5.6.200.0030.08318.20
5.6.190.0130.07720.63
5.6.180.0170.07320.67
5.6.170.0270.08320.56
5.6.160.0100.05020.39
5.6.150.0100.07718.22
5.6.140.0030.04718.28
5.6.130.0070.07018.21
5.6.120.0100.08021.14
5.6.110.0130.07320.99
5.6.100.0070.07021.02
5.6.90.0100.03321.10
5.6.80.0070.06720.51
5.5.350.0270.08320.45
5.5.340.0030.07318.09
5.5.330.0070.08720.46
5.5.320.0030.06320.38
5.5.310.0230.06720.41
5.5.300.0100.08018.01
5.5.290.0070.08017.95
5.5.280.0100.07720.68
5.5.270.0130.07320.80
5.5.260.0100.07320.95
5.5.250.0100.07020.59
5.5.240.0330.06320.26
5.4.450.0870.05019.30
5.4.440.0730.04719.29
5.4.430.0070.05719.56
5.4.420.0530.05019.47
5.4.410.0530.06019.31
5.4.400.0430.06719.26
5.4.390.0100.05319.14
5.4.380.0330.04718.47
5.4.370.0200.05318.73
5.4.360.0200.05318.75
5.4.350.0270.05718.75
5.4.340.0300.07718.84
5.4.320.0060.03512.50
5.4.310.0040.04012.50
5.4.300.0090.03312.50
5.4.290.0090.04712.50
5.4.280.0110.04612.40
5.4.270.0100.04212.39
5.4.260.0070.03712.39
5.4.250.0080.03512.39
5.4.240.0050.03712.39
5.4.230.0090.05412.38
5.4.220.0080.05212.38
5.4.210.0040.05512.39
5.4.200.0120.04812.39
5.4.190.0100.03612.38
5.4.180.0050.04112.38
5.4.170.0090.03612.39
5.4.160.0050.03812.39
5.4.150.0100.03312.39
5.4.140.0070.05212.07
5.4.130.0120.04712.05
5.4.120.0080.05112.02
5.4.110.0120.04612.01
5.4.100.0080.04812.01
5.4.90.0090.05112.01
5.4.80.0060.05112.02
5.4.70.0080.05012.00
5.4.60.0070.05112.01
5.4.50.0100.03912.01
5.4.40.0090.04112.00
5.4.30.0070.04412.00
5.4.20.0070.03711.99
5.4.10.0070.03911.99
5.4.00.0050.04011.48
5.3.290.0070.03912.80
5.3.280.0050.04412.70
5.3.270.0140.04412.72
5.3.260.0130.08512.72
5.3.250.0080.04312.72
5.3.240.0070.04412.72
5.3.230.0070.04212.71
5.3.220.0060.04012.68
5.3.210.0080.04612.68
5.3.200.0110.03912.68
5.3.190.0080.03912.68
5.3.180.0100.03612.67
5.3.170.0100.03712.67
5.3.160.0060.05612.67
5.3.150.0110.05112.68
5.3.140.0060.04112.66
5.3.130.0060.03912.66
5.3.120.0080.05012.66
5.3.110.0130.04612.66
5.3.100.0070.03712.13
5.3.90.0100.04212.11
5.3.80.0100.05112.11
5.3.70.0050.04112.11
5.3.60.0040.04012.09
5.3.50.0050.03812.04
5.3.40.0090.04512.04
5.3.30.0090.03612.00
5.3.20.0060.04011.78
5.3.10.0100.03411.74
5.3.00.0100.03411.73
5.2.170.0070.0299.22
5.2.160.0060.0329.22
5.2.150.0040.0349.22
5.2.140.0060.0309.22
5.2.130.0060.0339.18
5.2.120.0090.0359.18
5.2.110.0040.0309.19
5.2.100.0030.0309.18
5.2.90.0060.0309.18
5.2.80.0050.0399.18
5.2.70.0060.0379.18
5.2.60.0080.0309.13
5.2.50.0060.0329.09
5.2.40.0090.0359.07
5.2.30.0080.0409.05
5.2.20.0060.0299.04
5.2.10.0050.0288.94
5.2.00.0070.0278.80
5.1.60.0030.0268.09
5.1.50.0080.0408.09
5.1.40.0050.0328.07
5.1.30.0060.0328.42
5.1.20.0050.0308.44
5.1.10.0060.0268.16
5.1.00.0040.0288.17
5.0.50.0050.0206.64
5.0.40.0040.0196.50
5.0.30.0010.0336.31
5.0.20.0050.0176.28
5.0.10.0030.0206.26
5.0.00.0060.0316.25
4.4.90.0030.0164.77
4.4.80.0040.0164.76
4.4.70.0030.0174.76
4.4.60.0060.0154.76
4.4.50.0040.0164.77
4.4.40.0040.0264.71
4.4.30.0030.0174.76
4.4.20.0040.0164.85
4.4.10.0020.0184.85
4.4.00.0040.0264.76
4.3.110.0020.0194.67
4.3.100.0040.0144.66
4.3.90.0050.0134.64
4.3.80.0010.0264.58
4.3.70.0010.0174.63
4.3.60.0070.0114.63
4.3.50.0020.0164.63
4.3.40.0040.0254.54
4.3.30.0020.0233.30
4.3.20.0030.0183.28
4.3.10.0060.0183.24
4.3.00.0130.01710.55

preferences:
41.31 ms | 401 KiB | 5 Q