3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_array = array('Element 1', 'Element 2', 'Element 3', 'Element 4', 'Element 5', 'Element 6'); $infArray = array(1, 2, 3); $arrayIterator = new ArrayIterator($infArray); var_dump($arrayIterator->current()); $infiniteIterator = new InfiniteIterator(new ArrayIterator($infArray)); var_dump($infiniteIterator->current()); foreach($test_array as $test){ echo $test . ' ' . $infiniteIterator->current() . '<br/>' . PHP_EOL; $infiniteIterator->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.0180.00318.43
8.3.50.0110.01221.27
8.3.40.0130.00520.04
8.3.30.0120.00520.50
8.3.20.0050.00820.24
8.3.10.0090.00421.43
8.3.00.0070.00621.23
8.2.180.0100.00716.63
8.2.170.0120.00320.88
8.2.160.0140.00520.23
8.2.150.0040.00821.57
8.2.140.0090.00522.68
8.2.130.0120.00324.15
8.2.120.0040.00919.55
8.2.110.0060.01119.30
8.2.100.0040.01118.65
8.2.90.0080.00519.74
8.2.80.0060.00620.05
8.2.70.0140.00118.99
8.2.60.0080.00418.47
8.2.50.0070.00518.62
8.2.40.0080.00518.40
8.2.30.0060.00619.13
8.2.20.0080.00418.14
8.2.10.0090.00318.26
8.2.00.0070.00718.13
8.1.280.0120.00325.92
8.1.270.0060.00823.05
8.1.260.0110.00624.17
8.1.250.0100.00324.99
8.1.240.0060.00819.54
8.1.230.0100.00519.75
8.1.220.0090.00518.88
8.1.210.0080.00618.65
8.1.200.0040.00918.03
8.1.190.0090.00418.07
8.1.180.0100.00418.19
8.1.170.0020.01118.80
8.1.160.0110.00218.73
8.1.150.0040.00819.64
8.1.140.0040.00818.14
8.1.130.0060.00518.13
8.1.120.0080.00317.97
8.1.110.0060.00817.78
8.1.100.0060.00518.20
8.1.90.0040.00717.79
8.1.80.0070.00518.18
8.1.70.0070.00517.87
8.1.60.0070.00717.90
8.1.50.0120.00217.85
8.1.40.0060.00817.84
8.1.30.0090.00418.06
8.1.20.0120.00318.31
8.1.10.0080.00817.80
8.1.00.0120.00417.71
8.0.300.0100.00318.74
8.0.290.0090.00717.42
8.0.280.0090.00119.05
8.0.270.0050.00717.51
8.0.260.0090.00817.36
8.0.250.0100.00617.33
8.0.240.0110.00717.18
8.0.230.0100.00517.26
8.0.220.0150.00117.13
8.0.210.0100.00517.19
8.0.200.0120.00417.13
8.0.190.0120.00417.19
8.0.180.0120.00317.19
8.0.170.0110.00917.17
8.0.160.0130.00717.18
8.0.150.0100.00717.10
8.0.140.0150.00517.00
8.0.130.0130.00416.14
8.0.120.0130.00417.04
8.0.110.0130.00517.09
8.0.100.0100.00516.96
8.0.90.0110.00516.97
8.0.80.0140.00617.01
8.0.70.0070.00617.01
8.0.60.0100.00516.97
8.0.50.0110.00517.05
8.0.30.0070.01017.10
8.0.20.0120.00517.23
8.0.10.0130.00717.22
8.0.00.0080.01017.30
7.4.330.0060.00417.18
7.4.320.0100.00716.82
7.4.300.0140.00616.75
7.4.290.0140.00616.75
7.4.280.0180.00416.80
7.4.270.0150.00616.65
7.4.260.0100.00815.89
7.4.250.0140.00516.70
7.4.240.0160.00216.71
7.4.230.0100.00616.69
7.4.220.0130.00616.69
7.4.210.0100.00616.65
7.4.200.0080.00616.65
7.4.190.0110.00416.78
7.4.180.0110.00416.85
7.4.160.0100.00616.72
7.4.150.0150.00316.81
7.4.140.0120.00716.87
7.4.130.0100.00716.62
7.4.120.0090.00716.51
7.4.110.0110.00616.52
7.4.100.0140.00516.55
7.4.90.0140.00416.52
7.4.80.0080.00817.04
7.4.70.0100.00616.60
7.4.60.0100.00816.50
7.4.50.0090.00816.42
7.4.40.0110.00617.44
7.4.30.0110.00716.57
7.4.20.0100.00616.56
7.4.10.0120.00616.53
7.4.00.0100.00816.31
7.3.330.0120.00515.62
7.3.320.0130.00415.66
7.3.310.0120.00616.50
7.3.300.0120.00416.47
7.3.290.0130.00516.36
7.3.280.0120.00716.38
7.3.270.0110.00616.70
7.3.260.0120.00817.10
7.3.250.0130.00616.41
7.3.240.0140.00416.45
7.3.230.0110.00616.48
7.3.220.0160.00416.37
7.3.210.0140.00516.40
7.3.200.0120.00716.34
7.3.190.0110.00716.42
7.3.180.0120.00616.37
7.3.170.0090.00916.48
7.3.160.0130.00616.34
7.3.150.0100.00816.39
7.3.140.0130.00716.36
7.3.130.0130.00716.34
7.3.120.0080.00816.07
7.3.110.0100.00916.48
7.3.100.0110.00616.42
7.3.90.0110.00816.53
7.3.80.0120.00716.36
7.3.70.0110.00616.69
7.3.60.0130.00616.54
7.3.50.0110.00716.41
7.3.40.0150.00416.52
7.3.30.0110.00816.52
7.3.20.0180.00617.64
7.3.10.0360.00617.22
7.3.00.0320.00516.88
7.2.340.0160.00616.52
7.2.330.0150.00616.61
7.2.320.0140.00716.57
7.2.310.0140.00716.57
7.2.300.0130.00716.62
7.2.290.0140.00616.58
7.2.280.0160.00516.64
7.2.270.0140.00616.69
7.2.260.0150.00516.68
7.2.250.0120.00816.62
7.2.240.0140.00616.60
7.2.230.0150.00516.70
7.2.220.0140.00616.60
7.2.210.0150.00516.66
7.2.200.0120.01016.67
7.2.190.0160.00516.78
7.2.180.0140.00716.66
7.2.170.0140.00616.79
7.2.160.0150.00616.75
7.2.150.0160.00617.95
7.2.140.0190.00418.00
7.2.130.0240.00717.22
7.2.120.0230.00717.20
7.2.110.0240.00717.22
7.2.100.0340.00617.24
7.2.90.0260.00817.04
7.2.80.0280.00617.21
7.2.70.0210.00817.20
7.2.60.0210.00817.04
7.2.50.0260.00517.04
7.2.40.0380.00917.31
7.2.30.0490.00617.31
7.2.20.0300.00817.33
7.2.10.0350.00917.31
7.2.00.0320.00717.59
7.1.330.0180.00716.89
7.1.320.0140.00716.88
7.1.310.0160.00616.74
7.1.300.0150.00716.77
7.1.290.0170.00416.79
7.1.280.0130.00816.80
7.1.270.0130.00716.94
7.1.260.0160.00416.71
7.1.250.0280.00616.00
7.1.240.0250.00416.02
7.1.230.0310.00715.99
7.1.220.0270.00815.76
7.1.210.0250.00715.89
7.1.200.0250.00515.94
7.1.190.0250.00516.04
7.1.180.0240.00715.77
7.1.170.0240.00616.00
7.1.160.0360.00616.16
7.1.150.0360.00716.00
7.1.140.0480.00816.05
7.1.130.0330.00716.00
7.1.120.0350.00715.97
7.1.110.0360.00615.98
7.1.100.0320.00716.13
7.1.90.0380.00615.97
7.1.80.0800.00716.04
7.1.70.0660.00815.76
7.1.60.0720.00720.22
7.1.50.0740.00820.30
7.1.40.0600.00820.17
7.1.30.0850.00820.18
7.1.20.0580.00720.17
7.1.10.0470.00715.74
7.1.00.0500.00715.65
7.0.330.0360.00715.70
7.0.320.0300.00615.73
7.0.310.0220.00815.65
7.0.300.0260.00715.64
7.0.290.0350.00615.71
7.0.280.0240.00715.62
7.0.270.0330.00715.80
7.0.260.0360.00715.84
7.0.250.0380.00715.78
7.0.240.0320.00915.74
7.0.230.0540.00615.86
7.0.220.0360.00615.75
7.0.210.0270.00915.57
7.0.200.0980.00715.59
7.0.190.1080.00815.54
7.0.180.0530.00815.42
7.0.170.0750.00615.47
7.0.160.0740.00715.36
7.0.150.0470.00515.38
7.0.140.0400.00815.38
7.0.130.0490.00815.51
7.0.120.0430.00815.53
7.0.110.0470.00815.51
7.0.100.0480.00815.41
7.0.90.0430.00815.35
7.0.80.0450.00615.41
7.0.70.0450.00715.37
7.0.60.0450.00715.38
7.0.50.0540.00715.37
7.0.40.0520.00815.30
7.0.30.0520.00815.27
7.0.20.0480.00815.23
7.0.10.0470.00615.30
7.0.00.0440.00915.23
5.6.400.0130.00715.88
5.6.390.0110.00915.81
5.6.380.0170.00615.31
5.6.370.0150.00615.37
5.6.360.0120.01015.41
5.6.350.0170.00515.32
5.6.340.0140.00715.42
5.6.330.0110.00915.40
5.6.320.0150.00715.42
5.6.310.0110.01015.35
5.6.300.0120.02116.67
5.6.290.0140.02016.70
5.6.280.0150.01816.72
5.6.270.0130.02016.78
5.6.260.0160.01816.75
5.6.250.0160.01916.74
5.6.240.0140.02216.72
5.6.230.0110.02316.73
5.6.220.0120.02216.76
5.6.210.0150.01816.74
5.6.200.0150.02116.77
5.6.190.0140.02216.76
5.6.180.0130.01916.68
5.6.170.0140.02116.78
5.6.160.0150.02116.77
5.6.150.0140.02116.80
5.6.140.0150.02116.82
5.6.130.0110.02316.74
5.6.120.0130.02316.69
5.6.110.0170.01916.76
5.6.100.0140.02216.72
5.6.90.0130.02216.74
5.6.80.0140.01916.53
5.6.70.0110.02116.60
5.6.60.0150.02016.54
5.6.50.0150.02116.55
5.6.40.0150.01916.57
5.6.30.0140.01916.55
5.6.20.0130.02116.60
5.6.10.0150.02016.49
5.6.00.0110.02316.54
5.5.380.0110.02115.11
5.5.370.0120.02015.16
5.5.360.0140.01815.08
5.5.350.0130.02015.02
5.5.340.0120.02215.16
5.5.330.0140.01815.13
5.5.320.0130.01915.12
5.5.310.0140.02215.19
5.5.300.0120.01915.11
5.5.290.0150.02115.14
5.5.280.0140.02115.19
5.5.270.0140.02015.17
5.5.260.0130.02115.09
5.5.250.0110.02215.15
5.5.240.0130.02015.02
5.5.230.0130.01815.02
5.5.220.0130.02014.98
5.5.210.0130.02015.04
5.5.200.0140.01915.03
5.5.190.0120.02214.95
5.5.180.0130.01915.04
5.5.170.0130.00614.21
5.5.160.0100.01914.96
5.5.150.0120.01814.98
5.5.140.0110.01914.89
5.5.130.0130.02014.97
5.5.120.0120.02014.96
5.5.110.0110.02214.96
5.5.100.0100.02114.88
5.5.90.0140.01814.97
5.5.80.0140.02014.95
5.5.70.0150.02015.00
5.5.60.0110.02014.96
5.5.50.0120.02014.97
5.5.40.0120.02214.95
5.5.30.0110.01914.98
5.5.20.0140.02014.95
5.5.10.0120.02114.93
5.5.00.0100.02214.89
5.4.450.0120.02014.08
5.4.440.0130.01914.15
5.4.430.0130.01814.18
5.4.420.0120.01914.17
5.4.410.0140.01614.11
5.4.400.0110.02214.04
5.4.390.0090.02214.02
5.4.380.0120.01914.02
5.4.370.0110.01714.05
5.4.360.0100.01913.99
5.4.350.0100.01814.01
5.4.340.0130.01814.06
5.4.330.0130.00412.38
5.4.320.0120.01814.01
5.4.310.0110.01914.07
5.4.300.0110.01914.03
5.4.290.0120.01814.03
5.4.280.0110.01914.00
5.4.270.0110.01914.04
5.4.260.0130.01814.02
5.4.250.0110.02114.01
5.4.240.0110.02114.03
5.4.230.0120.01713.97
5.4.220.0100.01813.92
5.4.210.0130.01913.92
5.4.200.0110.02013.95
5.4.190.0110.02013.94
5.4.180.0110.01914.00
5.4.170.0110.02013.94
5.4.160.0090.02213.91
5.4.150.0110.01913.96
5.4.140.0140.02013.40
5.4.130.0100.02113.42
5.4.120.0120.01913.41
5.4.110.0120.01613.42
5.4.100.0120.01713.43
5.4.90.0110.01613.48
5.4.80.0130.01613.48
5.4.70.0110.01713.48
5.4.60.0090.02113.43
5.4.50.0120.02013.42
5.4.40.0100.01913.42
5.4.30.0110.01713.43
5.4.20.0100.01813.39
5.4.10.0110.01913.49
5.4.00.0090.01813.23
5.3.290.0120.01713.17
5.3.280.0110.01713.10
5.3.270.0100.02013.09
5.3.260.0090.01913.09
5.3.250.0130.01813.08
5.3.240.0100.02013.00
5.3.230.0090.02013.07
5.3.220.0100.01712.96
5.3.210.0100.01912.98
5.3.200.0090.02012.94
5.3.190.0100.01913.02
5.3.180.0110.01913.08
5.3.170.0120.01913.10
5.3.160.0100.02013.13
5.3.150.0100.02013.10
5.3.140.0120.01813.06
5.3.130.0110.01813.04
5.3.120.0100.01913.06
5.3.110.0130.02013.04
5.3.100.0120.01712.89
5.3.90.0100.02012.87
5.3.80.0100.01912.89
5.3.70.0090.01712.84
5.3.60.0100.01812.90
5.3.50.0100.01712.84
5.3.40.0100.01812.88
5.3.30.0100.01812.86
5.3.20.0080.01712.77
5.3.10.0100.01512.69
5.3.00.0080.02012.65

preferences:
53.93 ms | 401 KiB | 5 Q