3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = simplexml_load_string(<<<EOD <x> <ml>1</ml> <ml>2</ml> <ml>3</ml> <ml>4</ml> <ml>5</ml> </x> EOD ); $gen = function() use ($xml) { $it = new IteratorIterator($xml->ml); $it->rewind(); $norewit = new NoRewindIterator($it); $count = 0; foreach ($norewit as $key => $value) { $count++; yield $key => "[$value]"; if ($count < 2) { continue; } $norewit->next(); yield from $norewit; } }; print_r(iterator_to_array($gen(), false));

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.0160.00018.56
8.3.50.0060.01018.23
8.3.40.0040.01119.22
8.3.30.0040.01119.00
8.3.20.0080.00022.96
8.3.10.0000.00823.71
8.3.00.0040.00420.88
8.2.180.0120.00918.54
8.2.170.0110.00422.96
8.2.160.0070.00722.43
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0020.00526.16
8.2.120.0050.00226.16
8.2.110.0090.00020.77
8.2.100.0080.00318.03
8.2.90.0000.00820.67
8.2.80.0000.00819.57
8.2.70.0000.00818.14
8.2.60.0030.00618.16
8.2.50.0040.00418.10
8.2.40.0050.00322.60
8.2.30.0000.00719.46
8.2.20.0040.00418.16
8.2.10.0040.00419.09
8.2.00.0040.00419.38
8.1.280.0120.00625.92
8.1.270.0060.00322.63
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0100.01322.50
8.1.230.0090.00324.01
8.1.220.0050.00317.80
8.1.210.0000.01219.16
8.1.200.0040.00417.60
8.1.190.0040.00417.61
8.1.180.0060.00318.10
8.1.170.0040.00419.02
8.1.160.0070.00020.35
8.1.150.0050.00219.08
8.1.140.0000.00819.12
8.1.130.0030.00620.23
8.1.120.0040.00417.64
8.1.110.0050.00317.62
8.1.100.0000.00817.71
8.1.90.0060.00317.55
8.1.80.0030.00517.61
8.1.70.0000.00717.59
8.1.60.0040.00417.76
8.1.50.0000.00817.72
8.1.40.0090.00017.67
8.1.30.0030.00917.82
8.1.20.0030.00617.70
8.1.10.0030.00717.86
8.1.00.0050.00317.70
8.0.300.0030.00520.15
8.0.290.0100.00017.00
8.0.280.0070.00018.72
8.0.270.0040.00417.53
8.0.260.0030.00320.11
8.0.250.0080.00317.22
8.0.240.0030.00517.23
8.0.230.0050.00317.20
8.0.220.0000.00717.17
8.0.210.0000.00817.17
8.0.200.0030.00317.08
8.0.190.0000.00717.25
8.0.180.0040.00417.23
8.0.170.0030.00617.05
8.0.160.0070.00017.22
8.0.150.0030.00517.20
8.0.140.0080.00017.02
8.0.130.0060.00313.54
8.0.120.0040.00417.20
8.0.110.0030.00517.20
8.0.100.0040.00417.02
8.0.90.0050.00517.18
8.0.80.0050.01117.19
8.0.70.0040.00417.05
8.0.60.0080.00017.02
8.0.50.0000.00717.06
8.0.30.0070.01017.25
8.0.20.0110.00917.37
8.0.10.0040.00417.16
8.0.00.0060.01317.10
7.4.330.0060.00015.55
7.4.320.0030.00316.83
7.4.300.0000.00616.83
7.4.290.0070.00016.68
7.4.280.0000.00716.79
7.4.270.0000.00616.65
7.4.260.0050.00013.46
7.4.250.0040.00416.62
7.4.240.0000.00816.75
7.4.230.0050.00316.91
7.4.220.0020.00616.81
7.4.210.0080.00816.79
7.4.200.0000.00716.53
7.4.130.0080.00816.93
7.4.120.0030.01516.70
7.4.110.0120.01516.75
7.4.100.0100.00716.65
7.4.90.0180.00016.54
7.4.80.0050.01219.39
7.4.70.0190.00016.76
7.4.60.0100.00616.73
7.4.50.0070.01016.70
7.4.40.0170.00016.90
7.4.00.0060.00914.94
7.3.330.0000.00816.45
7.3.320.0030.00313.50
7.3.310.0070.00016.66
7.3.300.0070.00016.58
7.3.290.0070.01416.64
7.3.260.0090.01016.80
7.3.240.0110.00716.68
7.3.230.0090.01116.84
7.3.210.0100.00716.74
7.3.200.0100.01216.59
7.3.190.0110.00516.71
7.3.180.0110.00616.69
7.3.170.0160.00316.68
7.3.160.0170.00016.60
7.3.110.0090.00614.80
7.3.100.0060.00614.89
7.3.90.0040.01214.96
7.3.80.0070.00715.01
7.3.70.0090.00614.89
7.3.60.0040.01115.00
7.3.50.0070.00715.08
7.3.40.0100.00314.89
7.3.30.0030.01014.63
7.3.20.0060.01214.96
7.3.10.0140.00315.10
7.3.00.0100.00615.13
7.2.330.0060.01316.75
7.2.320.0080.00816.87
7.2.310.0060.01117.00
7.2.300.0070.01016.95
7.2.290.0100.01316.97
7.2.240.0070.01115.08
7.2.230.0120.00315.07
7.2.220.0090.00915.40
7.2.210.0110.00715.02
7.2.200.0060.00915.20
7.2.190.0110.00314.96
7.2.180.0030.01015.18
7.2.170.0110.00315.13
7.2.160.0120.00615.26
7.2.150.0100.00915.02
7.2.140.0030.01515.28
7.2.130.0030.01215.10
7.2.120.0060.00915.20
7.2.110.0030.01215.27
7.2.100.0150.00615.41
7.2.90.0150.00615.34
7.2.80.0120.00915.01
7.2.70.0100.00714.98
7.2.60.0110.00315.33
7.2.50.0060.01215.25
7.2.40.0030.01415.34
7.2.30.0060.00915.20
7.2.20.0090.00615.37
7.2.10.0080.00815.31
7.2.00.0090.00815.13
7.1.330.0030.01714.00
7.1.320.0090.00913.80
7.1.310.0090.01314.24
7.1.300.0100.00614.13
7.1.290.0100.00314.05
7.1.280.0240.00714.08
7.1.270.0090.00914.14
7.1.260.0070.01014.15
7.1.250.0080.00714.02

preferences:
61.51 ms | 401 KiB | 5 Q