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 $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.70.0070.00716.50
8.3.60.0110.00716.37
8.3.50.0090.01021.28
8.3.40.0120.00318.69
8.3.30.0100.00318.84
8.3.20.0000.00820.26
8.3.10.0070.00021.96
8.3.00.0060.00323.35
8.2.190.0150.00016.79
8.2.180.0070.01418.29
8.2.170.0070.00722.96
8.2.160.0070.00719.45
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00419.83
8.2.120.0000.00826.35
8.2.110.0030.00722.25
8.2.100.0060.00617.80
8.2.90.0000.00819.17
8.2.80.0000.00818.05
8.2.70.0030.00617.63
8.2.60.0070.00017.93
8.2.50.0050.00318.07
8.2.40.0040.00422.15
8.2.30.0000.00719.46
8.2.20.0050.00217.75
8.2.10.0090.00018.04
8.2.00.0030.00518.06
8.1.280.0120.00625.92
8.1.270.0090.00923.88
8.1.260.0000.00828.09
8.1.250.0080.00028.09
8.1.240.0090.00920.87
8.1.230.0080.00419.06
8.1.220.0080.00017.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0030.00518.10
8.1.170.0000.00818.57
8.1.160.0000.00720.78
8.1.150.0070.00018.90
8.1.140.0090.00319.69
8.1.130.0000.00717.71
8.1.120.0040.00417.50
8.1.110.0000.00717.43
8.1.100.0040.00417.45
8.1.90.0000.00817.37
8.1.80.0080.00017.37
8.1.70.0000.00717.52
8.1.60.0090.00017.59
8.1.50.0040.00417.41
8.1.40.0080.00017.48
8.1.30.0000.00817.64
8.1.20.0020.00517.66
8.1.10.0040.00417.59
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.32
8.0.270.0030.00317.23
8.0.260.0000.00817.26
8.0.250.0000.00717.03
8.0.240.0040.00416.92
8.0.230.0020.00516.89
8.0.220.0040.00416.93
8.0.210.0000.00717.02
8.0.200.0000.00717.02
8.0.190.0090.00017.00
8.0.180.0040.00416.90
8.0.170.0080.00016.95
8.0.160.0070.00017.09
8.0.150.0040.00416.91
8.0.140.0000.00716.80
8.0.130.0030.00313.43
8.0.120.0030.00616.82
8.0.110.0000.00816.90
8.0.100.0040.00316.82
8.0.90.0040.00416.98
8.0.80.0060.01116.95
8.0.70.0040.00417.01
8.0.60.0040.00416.87
8.0.50.0070.00017.07
8.0.30.0080.00817.13
8.0.20.0120.00817.42
8.0.10.0000.00716.89
8.0.00.0100.01116.85
7.4.330.0050.00016.78
7.4.320.0040.00416.52
7.4.300.0040.00416.43
7.4.290.0030.00316.41
7.4.280.0040.00516.49
7.4.270.0000.00816.59
7.4.260.0070.00316.36
7.4.250.0070.00016.46
7.4.240.0050.00216.45
7.4.230.0030.00316.72
7.4.220.0070.01716.54
7.4.210.0110.00616.58
7.4.200.0000.00716.61
7.4.160.0090.00616.54
7.4.150.0100.01017.40
7.4.140.0080.01317.86
7.4.130.0100.01616.77
7.4.120.0060.01216.56
7.4.110.0090.00916.52
7.4.100.0030.01716.57
7.4.90.0030.01416.58
7.4.80.0070.01019.39
7.4.70.0160.00016.46
7.4.60.0120.00416.42
7.4.50.0070.00716.42
7.4.40.0150.00316.48
7.4.30.0060.00916.37
7.4.10.0170.00014.84
7.4.00.0100.00814.97
7.3.330.0000.00713.26
7.3.320.0030.00313.41
7.3.310.0070.00016.40
7.3.300.0040.00416.26
7.3.290.0000.00716.43
7.3.280.0080.00816.31
7.3.270.0090.00917.40
7.3.260.0030.01316.61
7.3.240.0110.00816.58
7.3.230.0110.00716.43
7.3.210.0090.00916.44
7.3.200.0160.00619.39
7.3.190.0170.00016.57
7.3.180.0090.00616.46
7.3.170.0110.01116.73
7.3.160.0000.01516.69
7.3.130.0040.00814.80
7.3.120.0060.01014.94
7.3.110.0090.00614.98
7.3.100.0030.01115.01
7.3.90.0060.00514.94
7.3.80.0050.00814.82
7.3.70.0030.01214.92
7.3.60.0030.01214.78
7.3.50.0030.00914.84
7.3.40.0060.00414.81
7.3.30.0030.01014.81
7.3.20.0100.00716.60
7.3.10.0080.00616.72
7.3.00.0030.01116.63
7.2.330.0090.00916.65
7.2.320.0070.01116.70
7.2.310.0130.00316.44
7.2.300.0120.00416.36
7.2.290.0030.01316.71
7.2.260.0090.00915.22
7.2.250.0070.01215.10
7.2.240.0040.01115.11
7.2.230.0070.00915.05
7.2.220.0090.00715.00
7.2.210.0070.00914.97
7.2.200.0040.00914.99
7.2.190.0050.01015.02
7.2.180.0040.00915.07
7.2.170.0040.01015.14
7.2.160.0090.00915.11
7.2.150.0080.00616.71
7.2.140.0100.00216.59
7.2.130.0080.01116.98
7.2.120.0060.01116.79
7.2.110.0160.00916.75
7.2.100.0130.00416.90
7.2.90.0040.01116.72
7.2.80.0070.00816.91
7.2.70.0100.00616.91
7.2.60.0030.01216.89
7.2.50.0030.01316.73
7.2.40.0100.00716.61
7.2.30.0050.01316.90
7.2.20.0070.00816.90
7.2.10.0090.00616.88
7.2.00.0070.00717.76
7.1.330.0020.01115.75
7.1.320.0080.00415.72
7.1.310.0080.00615.80
7.1.300.0100.00415.70
7.1.290.0090.00515.63
7.1.280.0050.01115.70
7.1.270.0070.00815.72
7.1.260.0060.00915.60
7.1.250.0170.00815.37
7.1.240.0030.01015.73
7.1.230.0130.00015.75
7.1.220.0030.01015.69
7.1.210.0060.00315.87
7.1.200.0050.00515.73
7.1.190.0000.01815.77
7.1.180.0090.00315.68
7.1.170.0110.00615.86
7.1.160.0000.01515.91
7.1.150.0100.00315.79
7.1.140.0040.00415.71
7.1.130.0040.00815.44
7.1.120.0070.00715.77
7.1.110.0070.01015.60
7.1.100.0050.01116.74
7.1.90.0080.00815.41
7.1.80.0000.01315.56
7.1.70.0070.00316.43
7.1.60.0100.01217.41
7.1.50.0050.00816.17
7.1.40.0040.01515.76
7.1.30.0090.00615.41
7.1.20.0070.00715.78
7.1.10.0040.01115.79
7.1.00.0050.04018.96
7.0.330.0030.00715.54
7.0.320.0100.00315.52
7.0.310.0000.01615.41
7.0.300.0030.01015.34
7.0.290.0000.01715.39
7.0.280.0090.00315.37
7.0.270.0040.00815.34
7.0.260.0060.00915.48
7.0.250.0090.00615.48
7.0.240.0070.00715.53
7.0.230.0030.00615.49
7.0.220.0030.00615.30
7.0.210.0090.00615.51
7.0.200.0030.01115.96
7.0.190.0070.01015.40
7.0.180.0040.01115.23
7.0.170.0150.00015.48
7.0.160.0140.00015.26
7.0.150.0090.00615.50
7.0.140.0120.00315.43
7.0.130.0030.01015.23
7.0.120.0000.01515.51
7.0.110.0040.00815.25
7.0.100.0030.00915.41
7.0.90.0030.00615.04
7.0.80.0030.01215.61
7.0.70.0000.01015.54
7.0.60.0050.04018.60
7.0.50.0040.02716.71
7.0.40.0030.02616.91
7.0.30.0070.02816.82
7.0.20.0120.02716.82
7.0.10.0020.02916.86
7.0.00.0020.04716.68
5.6.400.0070.00714.08
5.6.390.0100.00314.10
5.6.380.0060.00614.41
5.6.370.0080.00814.40
5.6.360.0060.00314.49
5.6.350.0070.01014.48
5.6.340.0100.00314.34
5.6.330.0060.00314.34
5.6.320.0060.01214.25
5.6.310.0140.00314.56
5.6.300.0090.00614.51
5.6.290.0130.00014.29
5.6.280.0030.01817.61
5.6.270.0110.00414.24
5.6.260.0030.00914.42
5.6.250.0030.00614.25
5.6.240.0070.00314.22
5.6.230.0000.01414.43
5.6.220.0030.00614.41
5.6.210.0060.03817.60
5.6.200.0050.04816.25
5.6.190.0070.03117.29
5.6.180.0170.03817.39
5.6.170.0230.03817.42
5.6.160.0090.02117.25
5.6.150.0030.02916.15
5.6.140.0080.02216.23
5.6.130.0160.03716.28
5.6.120.0110.03817.53
5.6.110.0030.04517.78
5.6.100.0080.04217.52
5.6.90.0080.02817.59
5.6.80.0130.02317.22
5.6.70.0030.01014.00
5.6.60.0040.00814.49
5.6.50.0000.01114.27
5.6.40.0040.01114.27
5.6.30.0060.00614.13
5.6.20.0060.00814.18
5.6.10.0030.01014.15
5.6.00.0000.01414.18
5.5.380.0060.00314.36
5.5.370.0120.00314.20
5.5.360.0050.00314.14
5.5.350.0080.04517.43
5.5.340.0060.02616.07
5.5.330.0080.04217.42
5.5.320.0170.04317.21
5.5.310.0180.04317.36
5.5.300.0050.02516.10
5.5.290.0030.04116.30
5.5.280.0070.04317.46
5.5.270.0110.04217.61
5.5.260.0070.04017.48
5.5.250.0170.03517.35
5.5.240.0030.04317.08
5.5.230.0040.01114.25
5.5.220.0090.00614.20
5.5.210.0100.00014.13
5.5.200.0000.01314.21
5.5.190.0080.00813.81
5.5.180.0090.00614.23
5.5.170.0070.00714.24
5.5.160.0070.00414.15
5.5.150.0040.01214.29
5.5.140.0070.01014.19
5.5.130.0070.00714.32
5.5.120.0100.00314.22
5.5.110.0060.00814.30
5.5.100.0030.01014.05
5.5.90.0050.00514.26
5.5.80.0100.00314.07
5.5.70.0030.00714.13
5.5.60.0100.00314.38
5.5.50.0070.00314.25
5.5.40.0030.00914.00
5.5.30.0000.01213.90
5.5.20.0030.00714.18
5.5.10.0070.00314.19
5.5.00.0000.01314.30

preferences:
75.16 ms | 401 KiB | 5 Q