3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Iterator { public current() { return "value"; } public key() { return new stdClass; } public next() { } public rewind() { } public valid() { return true; } } $test = new Test; foreach ($test as $key => $value) { var_dump($key, $value); break; }

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.2.00.0580.00716.97
7.1.120.0340.01116.20
7.1.110.0380.00815.60
7.1.100.0360.01115.67
7.1.90.0380.00315.31
7.1.80.0310.00615.74
7.1.70.0370.00814.98
7.1.60.0440.01133.22
7.1.50.0380.00732.88
7.1.40.0290.01032.57
7.1.30.0320.01132.46
7.1.20.0410.01032.55
7.1.10.0230.01014.54
7.1.00.0240.00814.42
7.0.260.0480.00916.00
7.0.250.0330.00915.19
7.0.240.0340.00915.54
7.0.230.0350.00515.38
7.0.220.0320.00715.29
7.0.210.0330.00914.45
7.0.200.1600.01014.72
7.0.190.0240.01014.57
7.0.180.0250.00514.34
7.0.170.0230.00814.08
7.0.160.0290.00814.21
7.0.150.0240.01014.22
7.0.140.0250.00714.35
7.0.130.0180.01014.38
7.0.120.0150.01114.46
7.0.110.1280.00614.34
7.0.100.0170.01414.22
7.0.90.0170.01414.29
7.0.80.0200.01014.24
7.0.70.0220.00714.27
7.0.60.0150.00913.94
7.0.50.0150.01014.34
7.0.40.0210.00914.45
7.0.30.0140.01214.36
7.0.20.0210.00314.46
7.0.10.0230.00914.49
7.0.00.0540.01114.47
5.6.300.0060.06420.64
5.6.290.0160.06220.74
5.6.280.0140.06020.87
5.6.270.0100.05820.88
5.6.260.0140.05620.82
5.6.250.0150.05620.74
5.6.240.0220.06520.78
5.6.230.0130.08220.86
5.6.220.0100.07320.82
5.6.210.0070.05920.77
5.6.200.0090.06320.75
5.6.190.0230.07220.71
5.6.180.0130.06420.74
5.6.170.0130.05920.72
5.6.160.0100.06220.72
5.6.150.0110.06220.71
5.6.140.0180.05720.84
5.6.130.0110.06620.81
5.6.120.0180.05920.77
5.6.110.0160.06220.89
5.6.100.0180.06620.70
5.6.90.0180.06920.89
5.6.80.0190.05520.26
5.6.70.0240.05820.13
5.6.60.0090.06520.07
5.6.50.0150.05720.06
5.6.40.0130.06020.18
5.6.30.0170.04820.18
5.6.20.0130.05520.17
5.6.10.0180.05120.18
5.6.00.0110.05320.15
5.5.380.0150.06317.50
5.5.370.0220.05517.46
5.5.360.0150.05717.40
5.5.350.0100.05217.46
5.5.340.0140.05918.07
5.5.330.0100.06718.02
5.5.320.0130.05717.86
5.5.310.0090.06018.08
5.5.300.0140.05518.03
5.5.290.0130.06517.98
5.5.280.0110.07117.90
5.5.270.0110.08018.11
5.5.260.0130.06117.96
5.5.250.0090.06017.84
5.5.240.0170.05617.30
5.5.230.0120.06417.41
5.5.220.0090.06217.34
5.5.210.0100.06317.46
5.5.200.0110.05317.42
5.5.190.0100.05517.38
5.5.180.0070.05617.37
5.5.160.0140.04817.37
5.5.150.0160.04917.24
5.5.140.0080.05517.40
5.5.130.0150.04717.36
5.5.120.0070.06017.42
5.5.110.0130.05417.03
5.5.100.0130.06017.11
5.5.90.0100.05917.23
5.5.80.0110.05917.00
5.5.70.0170.06217.09
5.5.60.0060.05417.31
5.5.50.0120.05017.27
5.5.40.0050.05317.30
5.5.30.0100.05417.27
5.5.20.0130.05017.25
5.5.10.0080.05516.95
5.5.00.0080.05317.17
5.4.450.0100.06519.45
5.4.440.0110.06519.30
5.4.430.0130.05619.30
5.4.420.0090.05619.24
5.4.410.0160.05919.15
5.4.400.0100.06018.90
5.4.390.0210.04818.99
5.4.380.0070.08219.10
5.4.370.0120.05119.06
5.4.360.0130.05518.95
5.4.350.0100.05419.23
5.4.340.0130.05318.85
5.4.320.0130.05319.01
5.4.310.0090.05419.02
5.4.300.0120.05419.04
5.4.290.0140.06019.06
5.4.280.0190.06118.95
5.4.270.0120.05719.03
5.4.260.0120.06118.93
5.4.250.0100.05718.97
5.4.240.0080.06718.98
5.4.230.0130.05918.94
5.4.220.0100.05518.88
5.4.210.0160.04719.12
5.4.200.0090.05319.13
5.4.190.0150.05219.05
5.4.180.0100.04918.97
5.4.170.0140.04919.11
5.4.160.0120.04919.01
5.4.150.0140.05019.01
5.4.140.0100.05816.63
5.4.130.0130.04316.56
5.4.120.0100.04816.49
5.4.110.0070.05716.55
5.4.100.0130.04416.45
5.4.90.0120.04516.66
5.4.80.0100.04816.62
5.4.70.0120.05216.58
5.4.60.0070.05216.40
5.4.50.0090.04816.62
5.4.40.0050.05216.70
5.4.30.0120.04916.56
5.4.20.0150.04416.59
5.4.10.0100.05416.53
5.4.00.0110.04515.93
5.3.290.0110.05114.81
5.3.280.0050.06414.72
5.3.270.0120.05614.89
5.3.260.0160.04714.77
5.3.250.0070.05214.76
5.3.240.0120.04814.76
5.3.230.0150.04514.65
5.3.220.0150.04314.68
5.3.210.0110.05714.69
5.3.200.0120.05514.72
5.3.190.0070.05414.69
5.3.180.0150.04514.72
5.3.170.0170.05314.82
5.3.160.0100.04814.76
5.3.150.0090.06014.78
5.3.140.0120.04614.79
5.3.130.0050.05714.71
5.3.120.0070.05314.79
5.3.110.0120.05014.83
5.3.100.0200.03914.32
5.3.90.0050.05314.25
5.3.80.0080.05014.10
5.3.70.0100.04714.08
5.3.60.0100.05314.23
5.3.50.0120.04614.06
5.3.40.0090.04814.13
5.3.30.0130.05214.05
5.3.20.0070.05113.92
5.3.10.0080.05013.84
5.3.00.0050.05313.72
5.2.170.0030.04611.29
5.2.160.0110.03511.24
5.2.150.0070.04611.26
5.2.140.0070.04211.26
5.2.130.0030.04311.30
5.2.120.0080.04011.29
5.2.110.0030.04211.26
5.2.100.0100.03611.25
5.2.90.0050.04111.35
5.2.80.0050.04111.17
5.2.70.0080.04011.26
5.2.60.0080.04011.16
5.2.50.0050.04311.14
5.2.40.0110.03611.21
5.2.30.0050.04511.21
5.2.20.0030.04311.09
5.2.10.0110.03711.04
5.2.00.0090.03810.65
5.1.60.0050.03610.18
5.1.50.0080.03510.03
5.1.40.0030.03610.14
5.1.30.0120.03210.55
5.1.20.0080.04310.48
5.1.10.0070.04110.15
5.1.00.0080.03410.21
5.0.50.0050.0379.23
5.0.40.0070.0309.23
5.0.30.0070.0399.23
5.0.20.0090.0229.23
5.0.10.0050.0329.23
5.0.00.0080.0419.23
4.4.90.0060.0199.23
4.4.80.0050.0199.23
4.4.70.0030.0219.23
4.4.60.0050.0209.23
4.4.50.0090.0169.23
4.4.40.0070.0329.23
4.4.30.0030.0229.23
4.4.20.0060.0259.23
4.4.10.0080.0199.23
4.4.00.0020.0359.23
4.3.110.0030.0229.23
4.3.100.0030.0229.23
4.3.90.0080.0209.23
4.3.80.0050.0319.23
4.3.70.0000.0249.23
4.3.60.0100.0139.23
4.3.50.0000.0249.23
4.3.40.0060.0319.23
4.3.30.0060.0199.23
4.3.20.0000.0269.23
4.3.10.0010.0269.23
4.3.00.0030.0209.23

preferences:
146.8 ms | 1394 KiB | 7 Q