3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ColumnFieldsIterator implements IteratorAggregate { public function getIterator() { return new ArrayIterator(['columns2','columns']); } } class RowFieldsIterator implements IteratorAggregate { public function getIterator() { return new ArrayIterator(['rows2','rows']); } } class AllIterator implements IteratorAggregate { public function getIterator() { $iterator = new AppendIterator; $iterator->append(new ColumnFieldsIterator); $iterator->append(new RowFieldsIterator); return $iterator ; } } $all = new AllIterator; foreach ($all as $k => $v) { echo "$k => $v\n"; }

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.0100.00316.75
8.3.50.0100.01016.47
8.3.40.0040.01118.83
8.3.30.0120.00318.98
8.3.20.0040.00420.29
8.3.10.0080.00021.82
8.3.00.0040.00423.77
8.2.180.0150.00618.42
8.2.170.0070.00722.96
8.2.160.0120.00319.33
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.77
8.2.120.0080.00026.35
8.2.110.0070.00322.13
8.2.100.0080.00418.01
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0000.00918.04
8.2.50.0060.00318.07
8.2.40.0000.00822.32
8.2.30.0080.00019.49
8.2.20.0040.00417.63
8.2.10.0060.00318.07
8.2.00.0020.00517.96
8.1.280.0120.00625.92
8.1.270.0180.00024.04
8.1.260.0080.00028.09
8.1.250.0050.00328.09
8.1.240.0030.00622.20
8.1.230.0000.01119.08
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0030.00617.23
8.1.190.0060.00317.35
8.1.180.0030.00518.10
8.1.170.0090.00018.69
8.1.160.0000.00720.78
8.1.150.0050.00318.86
8.1.140.0070.00319.46
8.1.130.0070.00017.46
8.1.120.0070.00017.49
8.1.110.0040.00417.48
8.1.100.0000.00817.47
8.1.90.0040.00417.44
8.1.80.0000.00917.50
8.1.70.0050.00217.52
8.1.60.0040.00417.48
8.1.50.0050.00317.56
8.1.40.0040.00417.50
8.1.30.0030.00617.67
8.1.20.0060.00317.61
8.1.10.0040.00417.51
8.1.00.0020.00517.48
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0070.00018.34
8.0.270.0080.00017.27
8.0.260.0030.00316.77
8.0.250.0060.00017.04
8.0.240.0040.00417.03
8.0.230.0000.00716.91
8.0.220.0000.00716.95
8.0.210.0040.00416.92
8.0.200.0000.00616.89
8.0.190.0070.00017.02
8.0.180.0000.00716.89
8.0.170.0090.00016.99
8.0.160.0030.00316.96
8.0.150.0000.00716.92
8.0.140.0070.00016.94
8.0.130.0000.00513.45
8.0.120.0030.00616.91
8.0.110.0040.00416.92
8.0.100.0050.00216.92
8.0.90.0000.00816.96
8.0.80.0070.01016.93
8.0.70.0050.00316.87
8.0.60.0040.00416.86
8.0.50.0070.00017.02
8.0.30.0070.01217.06
8.0.20.0120.00717.40
8.0.10.0050.00317.11
8.0.00.0080.01116.73
7.4.330.0000.00516.66
7.4.320.0030.00316.47
7.4.300.0050.00316.49
7.4.290.0070.00016.52
7.4.280.0030.00616.61
7.4.270.0070.00016.41
7.4.260.0070.00016.64
7.4.250.0000.00716.62
7.4.240.0020.00516.56
7.4.230.0030.00316.42
7.4.220.0040.01716.63
7.4.210.0060.01116.52
7.4.200.0000.00716.35
7.4.160.0090.00616.58
7.4.150.0120.00917.40
7.4.140.0090.00917.86
7.4.130.0120.00816.57
7.4.120.0070.01116.67
7.4.110.0040.01716.65
7.4.100.0120.00616.41
7.4.90.0070.01016.64
7.4.80.0040.01219.39
7.4.70.0110.00816.61
7.4.60.0080.00816.56
7.4.50.0070.01116.50
7.4.40.0090.00916.52
7.4.30.0090.00616.67
7.4.00.0100.00715.25
7.3.330.0000.00713.32
7.3.320.0000.00513.32
7.3.310.0070.00016.35
7.3.300.0070.00016.39
7.3.290.0000.00716.43
7.3.280.0090.00616.35
7.3.270.0140.01017.40
7.3.260.0100.00716.50
7.3.250.0100.00716.43
7.3.240.0090.00916.47
7.3.230.0090.01016.41
7.3.210.0080.00816.55
7.3.200.0140.00619.39
7.3.190.0000.01816.62
7.3.180.0080.00816.38
7.3.170.0130.00916.61
7.3.160.0040.01116.68
7.2.330.0070.01016.78
7.2.320.0100.01016.81
7.2.310.0080.01016.60
7.2.300.0060.01016.64
7.2.290.0070.01016.73
7.2.60.0070.00716.83
7.2.00.0000.01919.44
7.1.200.0060.00615.84
7.1.100.0070.00317.89
7.1.70.0040.00416.99
7.1.60.0100.01319.27
7.1.50.0070.01416.98
7.1.00.0070.07322.33
7.0.200.0000.00816.82
7.0.60.0200.05019.95
7.0.50.0130.06317.88
7.0.40.0070.07020.21
7.0.30.0100.04720.26
7.0.20.0230.05020.23
7.0.10.0030.04320.24
7.0.00.0130.06020.12
5.6.280.0000.03321.07
5.6.210.0070.06720.75
5.6.200.0000.04718.14
5.6.190.0130.04720.46
5.6.180.0230.04720.52
5.6.170.0270.07320.39
5.6.160.0030.06020.54
5.6.150.0100.08018.21
5.6.140.0100.08018.18
5.6.130.0130.08018.15
5.6.120.0200.07021.02
5.6.110.0070.07321.13
5.6.100.0030.05320.99
5.6.90.0170.05021.10
5.6.80.0130.06720.49
5.5.350.0070.08320.41
5.5.340.0030.06017.99
5.5.330.0070.04320.27
5.5.320.0370.05320.42
5.5.310.0300.08320.38
5.5.300.0000.04017.98
5.5.290.0000.07717.95
5.5.280.0130.05020.89
5.5.270.0000.05020.89
5.5.260.0030.05720.77
5.5.250.0070.07320.63
5.5.240.0000.07320.18

preferences:
48.7 ms | 400 KiB | 5 Q