3v4l.org

run code in 200+ PHP versions simultaneously
<?php echo "ArrayObject:\n"; $arrayobject = new ArrayObject([1, 2, 3]); foreach ($arrayobject as $i) { var_dump($i); } foreach ($arrayobject as $i) { var_dump($i); } echo "ArrayIterator:\n"; $arrayiterator = new ArrayIterator([1, 2, 3]); foreach ($arrayiterator as $i) { var_dump($i); } foreach ($arrayiterator as $i) { var_dump($i); }

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.3.10.0030.01416.60
7.3.00.0000.00916.73
7.2.130.0090.00316.76
7.2.120.0030.01316.76
7.2.110.0100.00616.52
7.2.100.0060.01016.96
7.2.90.0090.00616.84
7.2.80.0090.00616.44
7.2.70.0030.01016.96
7.2.60.0050.00616.91
7.2.50.0070.00716.85
7.2.40.0720.01217.67
7.2.30.0420.01117.62
7.2.20.0260.01317.77
7.2.10.0420.01117.63
7.2.00.0710.01317.51
7.1.250.0070.00715.80
7.1.200.0000.01315.75
7.1.160.0790.01516.74
7.1.150.0700.00916.78
7.1.140.0860.01416.85
7.1.130.0900.01416.81
7.1.120.0990.01116.75
7.1.110.1070.01016.31
7.1.100.0960.01315.97
7.1.90.1130.01216.09
7.1.80.1390.01216.31
7.1.70.1090.01115.33
7.1.60.1790.01732.97
7.1.50.1440.01832.86
7.1.40.1630.01732.53
7.1.30.1590.01432.62
7.1.20.1190.01532.69
7.1.10.1090.00914.75
7.1.00.0870.01214.77
7.0.290.0860.01316.49
7.0.270.0220.01116.68
7.0.260.1080.01516.62
7.0.250.1060.01315.86
7.0.240.1650.01215.96
7.0.230.0860.00616.07
7.0.220.1040.01316.12
7.0.210.0840.01414.77
7.0.200.0910.01415.13
7.0.190.0900.00914.85
7.0.180.0670.01214.58
7.0.170.1100.01314.43
7.0.160.0990.01314.32
7.0.150.1040.00914.38
7.0.140.1860.01414.39
7.0.130.0710.00914.88
7.0.120.0630.01514.56
7.0.110.0550.01314.59
7.0.100.0590.01214.38
7.0.90.0840.00914.42
7.0.80.0870.01114.80
7.0.70.1050.01214.57
7.0.60.0930.00814.48
7.0.50.0790.01614.46
7.0.40.0810.01114.79
7.0.30.0690.01714.54
7.0.20.0800.01214.66
7.0.10.0690.01014.66
7.0.00.0760.01314.52
5.6.300.0160.06120.81
5.6.290.0210.06620.80
5.6.280.0190.05920.91
5.6.270.0210.07220.78
5.6.260.0220.06120.74
5.6.250.0220.06520.94
5.6.240.0260.06520.76
5.6.230.0170.07120.82
5.6.220.0210.07020.84
5.6.210.0240.06520.57
5.6.200.0230.06820.79
5.6.190.0210.06920.71
5.6.180.0170.08020.92
5.6.170.0210.07320.85
5.6.160.0200.05920.80
5.6.150.0200.05820.74
5.6.140.0160.06920.82
5.6.130.0160.07720.97
5.6.120.0180.06320.76
5.6.110.0190.06320.77
5.6.100.0190.07320.84
5.6.90.0190.06720.76
5.6.80.0170.06120.17
5.6.70.0180.05420.09
5.6.60.0190.06120.22
5.6.50.0190.05720.15
5.6.40.0220.06420.16
5.6.30.0160.05820.17
5.6.20.0200.06320.15
5.6.10.0200.06320.25
5.6.00.0210.06220.10
5.5.380.0220.05517.49
5.5.370.0240.06617.43
5.5.360.0200.06217.57
5.5.350.0230.06217.56
5.5.340.0230.05817.88
5.5.330.0250.06717.91
5.5.320.0200.06117.95
5.5.310.0200.07517.90
5.5.300.0180.05917.93
5.5.290.0140.06217.88
5.5.280.0200.08017.94
5.5.270.0160.07017.79
5.5.260.0170.07318.04
5.5.250.0140.05817.51
5.5.240.0190.06817.43
5.5.230.0170.05817.38
5.5.220.0140.05517.44
5.5.210.0210.07317.28
5.5.200.0210.05817.35
5.5.190.0140.05817.31
5.5.180.0160.06017.40
5.5.160.0170.07217.32
5.5.150.0150.07917.14
5.5.140.0200.07417.32
5.5.130.0210.07117.09
5.5.120.0170.06017.32
5.5.110.0320.04917.27
5.5.100.0240.06717.16
5.5.90.0240.08217.09
5.5.80.0140.05817.21
5.5.70.0210.06917.11
5.5.60.0150.05317.17
5.5.50.0140.08017.30
5.5.40.0150.07117.23
5.5.30.0130.05617.23
5.5.20.0140.06817.28
5.5.10.0140.07917.04
5.5.00.0130.05517.19
5.4.450.0150.07519.30
5.4.440.0090.06719.50
5.4.430.0190.07519.33
5.4.420.0200.05119.36
5.4.410.0130.05619.20
5.4.400.0200.07018.98
5.4.390.0150.05918.95
5.4.380.0130.05618.92
5.4.370.0170.05519.04
5.4.360.0120.05719.01
5.4.350.0210.06719.17
5.4.340.0200.07218.99
5.4.320.0160.05619.08
5.4.310.0200.07118.89
5.4.300.0210.07419.06
5.4.290.0210.07219.17
5.4.280.0220.07019.08
5.4.270.0170.05118.91
5.4.260.0180.06318.98
5.4.250.0210.05518.88
5.4.240.0130.06419.03
5.4.230.0130.05918.94
5.4.220.0120.06118.98
5.4.210.0180.06518.79
5.4.200.0250.06218.85
5.4.190.0220.05318.95
5.4.180.0150.06118.94
5.4.170.0210.06919.03
5.4.160.0180.06319.06
5.4.150.0200.06919.16
5.4.140.0130.06316.55
5.4.130.0220.06116.50
5.4.120.0100.05416.40
5.4.110.0150.05116.50
5.4.100.0190.06216.36
5.4.90.0130.05316.63
5.4.80.0160.06616.43
5.4.70.0180.05116.55
5.4.60.0150.05016.29
5.4.50.0180.06716.54
5.4.40.0280.05516.57
5.4.30.0240.05116.48
5.4.20.0170.06916.48
5.4.10.0170.06916.57
5.4.00.0190.06415.99
5.3.290.0150.06814.80
5.3.280.0090.05814.71
5.3.270.0150.05414.59
5.3.260.0190.04914.59
5.3.250.0190.06314.67
5.3.240.0160.04914.70
5.3.230.0110.05514.59
5.3.220.0100.05314.59
5.3.210.0190.07214.74
5.3.200.0140.05714.70
5.3.190.0220.05914.76
5.3.180.0170.07314.71
5.3.170.0170.06814.63
5.3.160.0210.06414.76
5.3.150.0170.05314.68
5.3.140.0170.07314.55
5.3.130.0200.06714.66
5.3.120.0210.06714.54
5.3.110.0140.06614.47
5.3.100.0180.06713.84
5.3.90.0180.06514.06
5.3.80.0180.06214.01
5.3.70.0130.06214.09
5.3.60.0120.05114.16
5.3.50.0140.04814.01
5.3.40.0110.05414.02
5.3.30.0130.05013.89
5.3.20.0120.05213.79
5.3.10.0130.06313.80
5.3.00.0150.06713.83
5.2.170.0110.04511.20
5.2.160.0110.04011.33
5.2.150.0120.03811.16
5.2.140.0130.03911.33
5.2.130.0090.04111.24
5.2.120.0100.04111.33
5.2.110.0120.05611.09
5.2.100.0160.04611.03
5.2.90.0070.04511.32
5.2.80.0120.04211.02
5.2.70.0150.05311.23
5.2.60.0080.04211.29
5.2.50.0110.04211.23
5.2.40.0130.05111.19
5.2.30.0090.04311.02
5.2.20.0150.03511.07
5.2.10.0100.03810.90
5.2.00.0110.05510.71
5.1.60.0080.04810.13
5.1.50.0100.04710.04
5.1.40.0040.04810.10
5.1.30.0080.03710.48
5.1.20.0150.04810.22
5.1.10.0140.04210.04
5.1.00.0050.05710.09
5.0.50.0070.0318.62
5.0.40.0060.0298.70
5.0.30.0100.0488.48
5.0.20.0080.0348.48
5.0.10.0040.0308.48
5.0.00.0080.0518.48
4.4.90.0090.0278.48
4.4.80.0080.0188.48
4.4.70.0070.0218.48
4.4.60.0060.0218.48
4.4.50.0070.0208.48
4.4.40.0080.0338.48
4.4.30.0060.0248.48
4.4.20.0050.0238.48
4.4.10.0050.0268.48
4.4.00.0070.0328.48
4.3.110.0090.0278.48
4.3.100.0030.0248.48
4.3.90.0100.0238.48
4.3.80.0070.0418.48
4.3.70.0050.0298.48
4.3.60.0070.0278.48
4.3.50.0050.0238.48
4.3.40.0030.0418.48
4.3.30.0040.0228.48
4.3.20.0040.0228.48
4.3.10.0020.0268.48
4.3.00.0060.0278.48