3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Foo implements IteratorAggregate { public function getIterator() { return function() { yield from ['A', 'B', 'C']; yield from ['D', 'E', 'F']; }; } } print_r(iterator_to_array(new Foo()));

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.0140.00718.43
8.3.60.0090.00618.55
8.3.50.0140.00716.48
8.3.40.0100.00618.82
8.3.30.0060.00918.86
8.3.20.0040.00418.98
8.3.10.0050.00323.84
8.3.00.0040.00423.61
8.2.190.0120.00616.58
8.2.180.0090.00616.63
8.2.170.0070.00722.96
8.2.160.0120.00318.99
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0050.00222.10
8.2.120.0040.00426.35
8.2.110.0060.00321.05
8.2.100.0110.00017.91
8.2.90.0030.00617.97
8.2.80.0030.00517.97
8.2.70.0060.00318.04
8.2.60.0000.00817.93
8.2.50.0060.00318.10
8.2.40.0000.00720.64
8.2.30.0060.00319.38
8.2.20.0000.00717.98
8.2.10.0040.00418.12
8.2.00.0000.00719.56
8.1.280.0110.01125.92
8.1.270.0110.00422.16
8.1.260.0050.00226.35
8.1.250.0050.00328.09
8.1.240.0090.00022.61
8.1.230.0090.00321.04
8.1.220.0060.00317.74
8.1.210.0040.00418.89
8.1.200.0040.00417.35
8.1.190.0030.00517.13
8.1.180.0060.00318.10
8.1.170.0070.00018.98
8.1.160.0020.00518.80
8.1.150.0040.00418.88
8.1.140.0040.00418.91
8.1.130.0030.00318.95
8.1.120.0030.00317.40
8.1.110.0070.00017.38
8.1.100.0000.00817.36
8.1.90.0030.00617.43
8.1.80.0000.00717.41
8.1.70.0060.00317.41
8.1.60.0030.00617.54
8.1.50.0030.00517.47
8.1.40.0050.00317.50
8.1.30.0080.00017.52
8.1.20.0040.00417.46
8.1.10.0040.00417.47
8.1.00.0000.00817.45
8.0.300.0000.00819.98
8.0.290.0040.00416.75
8.0.280.0050.00318.34
8.0.270.0070.00017.23
8.0.260.0040.00417.31
8.0.250.0080.00016.91
8.0.240.0000.00817.00
8.0.230.0070.00016.88
8.0.220.0070.00016.82
8.0.210.0000.00716.95
8.0.200.0070.00016.88
8.0.190.0000.00816.94
8.0.180.0030.00516.94
8.0.170.0080.00016.86
8.0.160.0030.00617.04
8.0.150.0000.01116.88
8.0.140.0000.00716.89
8.0.130.0000.00513.45
8.0.120.0000.00716.83
8.0.110.0000.00817.00
8.0.100.0080.00016.82
8.0.90.0040.00416.99
8.0.80.0050.01216.93
8.0.70.0070.00016.83
8.0.60.0000.00716.97
8.0.50.0000.00716.89
8.0.30.0110.00917.10
8.0.20.0090.01417.40
8.0.10.0050.00317.10
8.0.00.0080.01216.78
7.4.330.0030.00315.55
7.4.320.0000.00716.56
7.4.300.0030.00316.47
7.4.290.0060.00316.40
7.4.280.0040.00416.59
7.4.270.0030.00716.54
7.4.260.0070.00016.55
7.4.250.0040.00416.38
7.4.240.0030.00316.58
7.4.230.0040.00416.47
7.4.220.0000.00816.46
7.4.210.0090.00616.51
7.4.200.0040.00416.61
7.4.160.0120.00416.42
7.4.140.0120.00517.86
7.4.130.0110.00616.29
7.4.120.0090.00916.52
7.4.110.0160.00316.52
7.4.100.0120.00616.37
7.4.90.0090.00816.57
7.4.80.0100.00719.39
7.4.70.0030.01316.47
7.4.60.0110.00416.53
7.4.50.0000.01916.22
7.4.40.0080.00816.41
7.4.00.0060.01014.77
7.3.330.0000.00513.28
7.3.320.0040.00413.36
7.3.310.0000.00716.21
7.3.300.0030.00316.30
7.3.290.0030.00316.21
7.3.280.0080.00616.29
7.3.260.0080.01016.51
7.3.240.0110.00716.44
7.3.230.0120.00916.59
7.3.210.0140.00916.38
7.3.200.0100.01016.42
7.3.190.0080.00816.32
7.3.180.0100.00716.43
7.3.170.0120.00616.47
7.3.160.0110.00416.35
7.2.330.0220.00016.65
7.2.320.0120.00616.46
7.2.310.0060.01716.45
7.2.300.0070.01016.61
7.2.290.0030.01416.72
7.2.80.0690.01014.59
7.2.70.0520.01214.77
7.2.60.0660.00514.88
7.2.50.0700.01014.85
7.2.40.0650.01014.90
7.2.30.0700.00514.86
7.2.20.0610.00814.79
7.2.10.0620.01014.85
7.2.00.0660.00814.89
7.1.200.0060.00815.46
7.1.190.0860.00413.72
7.1.180.0750.00613.77
7.1.170.0800.00913.45
7.1.160.0560.01013.54
7.1.150.0630.00713.69
7.1.140.0610.00613.64
7.1.130.0720.00713.60
7.1.120.0560.00713.71
7.1.110.0610.01013.82
7.1.100.0710.00513.81
7.1.90.0820.00913.53
7.1.80.0790.00613.76
7.1.70.0980.00613.68
7.1.60.1770.01031.62
7.1.50.1260.00831.65
7.1.40.0990.01231.64
7.1.30.1070.00831.55
7.1.20.1290.01031.63
7.1.10.1000.00913.61
7.1.00.1050.00513.69

preferences:
66.24 ms | 401 KiB | 5 Q