3v4l.org

run code in 300+ PHP versions simultaneously
<?php function chain(...$iters) { foreach ($iters as $iter) { yield from $iter; } } $gen = (function() { yield 1; yield 2; yield 3; })(); $repeatedTwice = chain($gen, $gen); foreach ($repeatedTwice as $v) var_dump($v);

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.0030.01516.88
8.3.50.0300.01021.08
8.3.40.0110.00318.98
8.3.30.0110.00418.85
8.3.20.0040.00420.16
8.3.10.0060.00323.54
8.3.00.0060.00319.66
8.2.180.0040.01118.29
8.2.170.0040.01422.96
8.2.160.0130.00020.35
8.2.150.0070.00724.18
8.2.140.0070.00724.66
8.2.130.0000.01026.16
8.2.120.0030.00617.50
8.2.110.0040.00422.16
8.2.100.0080.00417.75
8.2.90.0040.00419.20
8.2.80.0090.00017.97
8.2.70.0000.00817.75
8.2.60.0030.00517.93
8.2.50.0030.00518.07
8.2.40.0070.00019.42
8.2.30.0030.00618.07
8.2.20.0000.00817.80
8.2.10.0040.00418.10
8.2.00.0070.00018.13
8.1.280.0120.00325.92
8.1.270.0050.00220.24
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0060.00322.46
8.1.230.0060.00617.42
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0090.00017.35
8.1.190.0040.00417.36
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0070.00021.92
8.1.150.0040.00418.89
8.1.140.0080.00017.50
8.1.130.0040.00417.69
8.1.120.0000.00717.45
8.1.110.0080.00017.45
8.1.100.0000.00817.44
8.1.90.0050.00317.42
8.1.80.0040.00417.42
8.1.70.0030.00317.46
8.1.60.0060.00317.59
8.1.50.0060.00317.43
8.1.40.0030.00617.38
8.1.30.0040.00417.70
8.1.20.0020.00517.55
8.1.10.0000.00717.64
8.1.00.0030.00617.55
8.0.300.0070.00018.77
8.0.290.0060.00316.63
8.0.280.0070.00018.39
8.0.270.0030.00317.25
8.0.260.0030.00317.21
8.0.250.0000.00717.06
8.0.240.0000.00717.03
8.0.230.0030.00317.06
8.0.220.0040.00416.92
8.0.210.0070.00016.90
8.0.200.0000.00716.93
8.0.190.0040.00416.89
8.0.180.0000.00716.79
8.0.170.0040.00416.93
8.0.160.0060.00316.95
8.0.150.0030.00316.84
8.0.140.0070.00016.96
8.0.130.0060.00013.39
8.0.120.0000.00816.82
8.0.110.0060.00316.92
8.0.100.0020.00516.84
8.0.90.0000.00716.83
8.0.80.0060.00916.93
8.0.70.0000.00716.72
8.0.60.0080.00016.84
8.0.50.0000.00816.91
8.0.30.0120.00317.14
8.0.20.0150.00317.40
8.0.10.0070.00017.13
8.0.00.0060.01116.74
7.4.330.0060.00015.08
7.4.320.0020.00516.46
7.4.300.0070.00016.50
7.4.290.0030.00316.61
7.4.280.0040.00416.49
7.4.270.0000.00616.60
7.4.260.0060.00316.47
7.4.250.0040.00416.54
7.4.240.0040.00416.63
7.4.230.0030.00316.68
7.4.220.0040.01416.62
7.4.210.0100.01016.69
7.4.200.0000.00716.57
7.4.160.0130.00316.58
7.4.150.0070.01117.40
7.4.140.0120.00917.86
7.4.130.0100.00716.59
7.4.120.0110.00616.56
7.4.110.0120.00616.61
7.4.100.0110.00716.71
7.4.90.0090.00916.39
7.4.80.0050.01119.39
7.4.70.0130.00516.48
7.4.60.0030.01316.49
7.4.50.0080.00016.71
7.4.40.0140.00716.58
7.4.30.0090.00916.63
7.4.00.0070.00714.61
7.3.330.0050.00013.32
7.3.320.0000.00513.18
7.3.310.0030.00416.17
7.3.300.0040.00416.39
7.3.290.0080.00916.32
7.3.280.0080.00916.34
7.3.270.0170.00617.40
7.3.260.0070.01016.32
7.3.250.0080.01216.38
7.3.240.0060.01116.43
7.3.230.0060.01816.46
7.3.210.0060.01216.54
7.3.200.0140.01016.48
7.3.190.0090.00916.40
7.3.180.0150.00516.29
7.3.170.0130.00316.59
7.3.160.0060.01216.48
7.2.330.0090.00916.42
7.2.320.0160.00916.77
7.2.310.0060.01116.73
7.2.300.0090.00616.88
7.2.290.0100.01316.77
7.2.60.0040.01116.72
7.2.00.0130.00619.48
7.1.200.0000.01315.86
7.1.100.0000.01118.08
7.1.70.0030.00517.23
7.1.60.0140.00719.17
7.1.50.0200.00334.81
7.1.00.0070.07322.48
7.0.200.0030.00616.61
7.0.60.0200.07019.88
7.0.50.0100.08017.92
7.0.40.0030.05320.02
7.0.30.0300.03020.19
7.0.20.0330.07020.12
7.0.10.0000.05720.07
7.0.00.0100.05320.07
5.6.280.0030.05720.87
5.6.210.0070.06720.55
5.6.200.0070.06318.20
5.6.190.0100.08320.46
5.6.180.0070.08720.47
5.6.170.0270.06720.45
5.6.160.0130.03720.39
5.6.150.0070.05318.28
5.6.140.0030.04018.18
5.6.130.0070.06318.18
5.6.120.0030.04021.05
5.6.110.0100.08321.13
5.6.100.0100.07721.01
5.6.90.0000.09320.98
5.6.80.0030.08320.39
5.6.70.4730.04020.39
5.5.350.0270.07320.38
5.5.340.0030.04017.98
5.5.330.0030.04720.37
5.5.320.0100.07720.42
5.5.310.0170.05720.51
5.5.300.0030.08318.08
5.5.290.0070.08017.95
5.5.280.0070.03720.73
5.5.270.0170.07320.89
5.5.260.0100.05320.80
5.5.250.0000.04320.68
5.5.240.0200.07320.18
5.4.450.0270.05719.39
5.4.440.0200.06719.61
5.4.430.0230.06019.29
5.4.420.0270.05719.57
5.4.410.0300.05019.04
5.4.400.0370.05019.30
5.4.390.0400.05319.05
5.4.380.0270.05719.11
5.4.370.0230.05319.27
5.4.360.0330.04318.84
5.4.350.0330.04719.12
5.4.340.0300.05318.87
5.4.320.0270.05319.20
5.4.310.0200.05719.27
5.4.300.0270.05319.05
5.4.290.0300.04719.28
5.4.280.0330.04719.02
5.4.270.0270.04719.27
5.4.260.0270.05019.22
5.4.250.0270.05019.25
5.4.240.0300.05319.14
5.4.230.0300.04718.83
5.4.220.0330.04718.96
5.4.210.0300.05319.14
5.4.200.0370.03719.28
5.4.190.0230.05019.23
5.4.180.0270.04719.00
5.4.170.0230.05318.97
5.4.160.0300.04319.13
5.4.150.0270.05719.23
5.4.140.0370.04316.43
5.4.130.0330.04016.36
5.4.120.0270.05016.56
5.4.110.0330.04716.60
5.4.100.0470.04016.58
5.4.90.0230.05316.61
5.4.80.0370.04016.43
5.4.70.0400.05316.55
5.4.60.0270.03716.23
5.4.50.0200.06716.38
5.4.40.0000.04016.43
5.4.30.0100.06016.38
5.4.20.0000.07716.37

preferences:
88.5 ms | 401 KiB | 5 Q