3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ObjectKeyIterator extends IteratorIterator { public function __construct(\Traversable $iterator) { parent::__construct($iterator); } public function key() { $key = parent::key(); return (object)array('key' => $key); } } /*foreach(new ObjectKeyIterator(new ArrayObject(array('test' => 'foo', 2,4, 'bo' => 24,2))) as $key => $value) { var_dump($key, $value); }*/ $iterator = new ObjectKeyIterator(new ArrayObject(array('test' => 'foo', 2,4, 'bo' => 24,2))); $iterator->rewind(); while ($iterator->valid()) { $key = $iterator->key(); $value = $iterator->current(); var_dump($key, $value); $iterator->next(); }

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.0070.00716.63
8.3.50.0150.00321.90
8.3.40.0070.00718.75
8.3.30.0100.00319.05
8.3.20.0080.00020.21
8.3.10.0080.00023.52
8.3.00.0060.00322.36
8.2.180.0090.00916.63
8.2.170.0070.00722.96
8.2.160.0030.01022.02
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00822.08
8.2.110.0030.00622.01
8.2.100.0060.00617.72
8.2.90.0030.00519.23
8.2.80.0030.00617.97
8.2.70.0100.00017.50
8.2.60.0060.00318.03
8.2.50.0040.00418.07
8.2.40.0000.00818.22
8.2.30.0020.00518.12
8.2.20.0000.00817.64
8.2.10.0000.00717.56
8.2.00.0000.00717.68
8.1.280.0070.01125.92
8.1.270.0080.00023.77
8.1.260.0030.00626.35
8.1.250.0050.00228.09
8.1.240.0030.00723.90
8.1.230.0060.00618.76
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0000.00917.35
8.1.190.0050.00317.41
8.1.180.0000.00818.10
8.1.170.0000.00918.44
8.1.160.0000.00822.01
8.1.150.0070.00018.48
8.1.140.0000.00717.24
8.1.130.0030.00317.82
8.1.120.0040.00417.42
8.1.110.0030.00517.29
8.1.100.0000.00717.46
8.1.90.0080.00317.47
8.1.80.0030.00317.43
8.1.70.0040.00417.45
8.1.60.0050.00317.47
8.1.50.0030.00617.41
8.1.40.0000.00917.42
8.1.30.0000.00817.62
8.1.20.0030.00617.65
8.1.10.0030.00617.41
8.1.00.0080.00017.36
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0050.00318.38
8.0.270.0070.00017.19
8.0.260.0070.00018.61
8.0.250.0030.00316.95
8.0.240.0070.00017.01
8.0.230.0000.00716.81
8.0.220.0030.00516.88
8.0.210.0060.00316.87
8.0.200.0030.00316.93
8.0.190.0070.00016.91
8.0.180.0030.00316.89
8.0.170.0060.00316.96
8.0.160.0040.00416.91
8.0.150.0030.00316.92
8.0.140.0000.00716.83
8.0.130.0050.00013.36
8.0.120.0040.00416.77
8.0.110.0030.00516.89
8.0.100.0070.00016.87
8.0.90.0040.00416.91
8.0.80.0070.01016.84
8.0.70.0000.00816.92
8.0.60.0050.00216.69
8.0.50.0000.00716.94
8.0.30.0100.00917.23
8.0.20.0140.01117.40
8.0.10.0040.00416.96
8.0.00.0140.00816.72
7.4.330.0000.00515.04
7.4.320.0000.00716.52
7.4.300.0000.00616.42
7.4.290.0070.00416.59
7.4.280.0050.00216.59
7.4.270.0000.00816.46
7.4.260.0000.00816.63
7.4.250.0040.00416.46
7.4.240.0020.00616.50
7.4.230.0050.00216.31
7.4.220.0110.00716.54
7.4.210.0040.01316.55
7.4.200.0000.00716.54
7.4.190.0040.00416.69
7.4.160.0030.01216.36
7.4.150.0110.01117.40
7.4.140.0140.00517.86
7.4.130.0100.00716.54
7.4.120.0090.01016.44
7.4.110.0090.01016.38
7.4.100.0060.01216.53
7.4.90.0070.01016.51
7.4.80.0060.00919.39
7.4.70.0120.00616.48
7.4.60.0060.01016.54
7.4.50.0060.00316.26
7.4.40.0080.00722.77
7.4.30.0110.00416.56
7.4.00.0100.00714.78
7.3.330.0050.00213.37
7.3.320.0030.00213.31
7.3.310.0070.00016.26
7.3.300.0070.00016.36
7.3.290.0030.01016.27
7.3.280.0080.00916.38
7.3.270.0060.01217.40
7.3.260.0130.00416.50
7.3.250.0100.00716.54
7.3.240.0080.00816.55
7.3.230.0140.00316.65
7.3.210.0110.01016.37
7.3.200.0120.00919.39
7.3.190.0130.00316.70
7.3.180.0090.01216.51
7.3.170.0100.00716.53
7.3.160.0100.00616.45
7.3.120.0100.00315.14
7.3.10.0100.00316.49
7.3.00.0080.00716.57
7.2.330.0060.01216.40
7.2.320.0060.01116.74
7.2.310.0070.01016.42
7.2.300.0060.01216.50
7.2.290.0000.01716.66
7.2.130.0080.00716.81
7.2.120.0040.00916.65
7.2.110.0130.00716.63
7.2.100.0060.00816.72
7.2.90.0280.00516.36
7.2.80.0190.00716.26
7.2.70.0200.01016.31
7.2.60.0160.00716.57
7.2.50.0430.00716.43
7.2.40.0110.00416.33
7.2.30.0130.00416.35
7.2.20.0160.00816.50
7.2.10.0200.00916.27
7.2.00.0090.00716.90
7.1.250.0070.00615.74
7.1.210.1120.01313.98
7.1.200.0080.00814.79
7.1.190.0250.00913.81
7.1.180.1270.01313.88
7.1.170.0960.00714.02
7.1.160.0200.00813.93
7.1.150.0070.00713.78
7.1.140.1220.01313.79
7.1.130.0760.00013.40
7.1.120.0470.00013.57
7.1.110.0370.00013.41
7.1.100.0180.00715.99
7.1.90.0090.01213.83
7.1.80.0130.00313.63
7.1.70.0760.00815.17
7.1.60.0250.01525.42
7.1.50.1120.00924.44
7.1.40.0540.00931.86
7.1.30.0390.00831.42
7.1.20.0390.01431.84
7.1.10.0780.01313.49
7.1.00.0150.04118.03
7.0.310.1410.00713.59
7.0.300.0970.00313.37
7.0.290.1140.00613.40
7.0.280.0910.00613.68
7.0.270.0260.00413.18
7.0.260.1040.01313.33
7.0.250.0170.00713.57
7.0.240.0110.00313.44
7.0.230.0210.00913.16
7.0.220.0210.00713.36
7.0.210.0350.00013.33
7.0.200.0270.00214.95
7.0.190.0270.00713.52
7.0.180.0090.00913.45
7.0.170.0210.00513.08
7.0.160.0140.00713.36
7.0.150.0180.01113.35
7.0.140.0110.03817.66
7.0.130.0050.01313.26
7.0.120.0160.00313.28
7.0.110.0120.00913.48
7.0.100.0210.00313.36
7.0.90.0050.01313.34
7.0.80.0070.01113.40
7.0.70.0140.00913.11
7.0.60.0070.02516.48
7.0.50.0110.04115.63
7.0.40.0230.04016.88
7.0.30.0180.02516.76
7.0.20.0280.02316.72
7.0.10.0160.04716.94
7.0.00.0230.03616.96
5.6.300.0120.00313.77
5.6.290.0060.01114.02
5.6.280.0070.04017.58
5.6.270.0050.01314.04
5.6.260.0100.00813.98
5.6.250.0140.00014.09
5.6.240.0140.00314.06
5.6.230.0130.00413.75
5.6.220.0070.00713.85
5.6.210.0140.04317.41
5.6.200.0030.05216.07
5.6.190.0090.03717.24
5.6.180.0070.04117.49
5.6.170.0170.02917.30
5.6.160.0020.05517.16
5.6.150.0060.04616.03
5.6.140.0040.02516.12
5.6.130.0070.02216.23
5.6.120.0080.04617.67
5.6.110.0080.03617.57
5.6.100.0100.03717.56
5.6.90.0040.04317.52
5.6.80.0100.03817.35
5.6.70.0270.03517.41
5.6.60.0100.01014.15
5.6.50.0110.00813.89
5.6.40.0120.00713.76
5.6.30.0090.00913.92
5.6.20.0100.01114.23
5.6.10.0130.00614.07
5.6.00.0060.01013.78
5.5.380.0060.00611.14
5.5.370.0060.00310.93
5.5.360.0000.01310.61
5.5.350.0050.04815.71
5.5.340.0040.02714.52
5.5.330.0070.02715.78
5.5.320.0050.02315.62
5.5.310.0130.02915.58
5.5.300.0050.04214.62
5.5.290.0060.02114.50
5.5.280.0060.02215.92
5.5.270.0100.04016.06
5.5.260.0100.04215.93
5.5.250.0060.03015.96
5.5.240.0080.03915.72
5.5.230.0050.00911.04
5.5.220.0020.01110.75
5.5.210.0060.01010.86
5.5.200.0060.00710.59
5.5.190.0070.00611.08
5.5.180.0110.00410.91
5.5.170.0080.01114.28
5.5.160.0080.00411.02
5.5.150.0040.00810.58
5.5.140.0080.00610.84
5.5.130.0080.00411.02
5.5.120.0070.00610.99
5.5.110.0060.00611.01
5.5.100.0080.00610.79
5.5.90.0120.00011.10
5.5.80.0040.00710.93
5.5.70.0030.01010.95
5.5.60.0030.01210.72
5.5.50.0080.00510.88
5.5.40.0060.00610.86
5.5.30.0030.00710.57
5.5.20.0130.00011.02
5.5.10.0100.00311.16
5.5.00.0000.01210.80
5.4.450.0550.02815.24
5.4.440.0340.03015.34
5.4.430.0430.02315.21
5.4.420.0260.03615.05
5.4.410.0070.03314.96
5.4.400.0140.03314.65
5.4.390.0150.03314.79
5.4.380.0090.03314.64
5.4.370.0070.03314.68
5.4.360.0200.03014.76
5.4.350.0100.03214.83
5.4.340.0140.02614.66
5.4.330.0060.00610.55
5.4.320.0070.02011.48
5.4.310.0060.02611.69
5.4.300.0080.01911.74
5.4.290.0050.02511.66
5.4.280.0140.03111.63
5.4.270.0170.04911.58
5.4.260.0110.04011.63
5.4.250.0130.04111.65
5.4.240.0090.03711.64
5.4.230.0090.03211.62
5.4.220.0210.05711.59
5.4.210.0230.04111.65
5.4.200.0140.04411.56
5.4.190.0270.05811.66
5.4.180.0070.04211.63
5.4.170.0220.05111.54
5.4.160.0120.04011.63
5.4.150.0150.04411.66
5.4.140.0090.03111.51
5.4.130.0110.03811.44
5.4.120.0070.03111.38
5.4.110.0080.04111.44
5.4.100.0180.03211.36
5.4.90.0190.07711.34
5.4.80.0090.02711.43
5.4.70.0100.02811.49
5.4.60.0150.06511.42
5.4.50.0210.05511.52
5.4.40.0130.03511.45
5.4.30.0070.03011.29
5.4.20.0060.02811.32
5.4.10.0090.02111.45
5.4.00.0060.02411.19
5.3.290.0070.02211.63
5.3.280.0120.05211.59
5.3.270.0130.04711.59
5.3.260.0110.03411.59
5.3.250.0190.03611.67
5.3.240.0320.05011.59
5.3.230.0150.03111.63
5.3.220.0130.02811.60
5.3.210.0100.03911.59
5.3.200.0050.02511.57
5.3.190.0120.04911.60
5.3.180.0120.04911.70
5.3.170.0110.03811.62
5.3.160.0060.03911.57
5.3.150.0100.03011.57
5.3.140.0090.05611.67
5.3.130.0100.03211.56
5.3.120.0180.03711.56
5.3.110.0070.03511.62
5.3.100.0110.03811.29
5.3.90.0090.03711.35
5.3.80.0100.03611.27
5.3.70.0090.03711.28
5.3.60.0250.06411.34
5.3.50.0100.04911.24
5.3.40.0160.04911.26
5.3.30.0140.03611.30
5.3.20.0150.03311.11
5.3.10.0110.02711.09
5.3.00.0090.03511.08
5.2.170.0040.0299.83
5.2.160.0050.0339.83
5.2.150.0120.0279.83
5.2.140.0080.0369.83
5.2.130.0100.0319.80
5.2.120.0110.0249.80
5.2.110.0050.0269.81
5.2.100.0060.0249.81
5.2.90.0050.0279.81
5.2.80.0100.0229.81
5.2.70.0060.0279.81
5.2.60.0120.0499.78
5.2.50.0140.0539.77
5.2.40.0140.0249.75
5.2.30.0200.0439.74
5.2.20.0150.0329.74
5.2.10.0120.0589.69
5.2.00.0140.0229.63
5.1.60.0050.0279.27
5.1.50.0100.0259.27
5.1.40.0100.0319.26
5.1.30.0080.0299.43
5.1.20.0110.0299.45
5.1.10.0160.0399.31
5.1.00.0080.0369.31
5.0.50.0080.0298.54
5.0.40.0090.0248.47
5.0.30.0070.0418.38
5.0.20.0110.0208.36
5.0.10.0090.0328.35
5.0.00.0100.0298.35
4.4.90.0040.0187.62
4.4.80.0180.0247.61
4.4.70.0040.0197.61
4.4.60.0060.0257.61
4.4.50.0080.0187.62
4.4.40.0130.0357.58
4.4.30.0070.0197.61
4.4.20.0040.0247.65
4.4.10.0230.0337.66
4.4.00.0110.0387.61
4.3.110.0060.0127.56
4.3.100.0030.0167.56
4.3.90.0020.0137.55
4.3.80.0020.0207.52
4.3.70.0100.0267.54
4.3.60.0100.0207.54
4.3.50.0040.0187.54
4.3.40.0020.0197.50
4.3.30.0030.0136.87
4.3.20.0040.0116.86
4.3.10.0030.0116.85
4.3.00.0010.00812.05

preferences:
44.91 ms | 401 KiB | 5 Q