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; return 4; })(); $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.0070.01116.63
8.3.50.0200.00521.20
8.3.40.0070.00718.64
8.3.30.0070.00718.67
8.3.20.0000.00720.18
8.3.10.0040.00423.68
8.3.00.0050.00319.55
8.2.180.0100.00618.29
8.2.170.0000.01522.96
8.2.160.0100.00320.43
8.2.150.0110.00424.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0030.00617.63
8.2.110.0030.00622.20
8.2.100.0060.00717.50
8.2.90.0040.00419.21
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0090.00018.07
8.2.40.0040.00419.41
8.2.30.0030.00517.94
8.2.20.0050.00317.76
8.2.10.0030.00618.15
8.2.00.0000.00718.11
8.1.280.0090.00625.92
8.1.270.0080.00020.24
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00722.47
8.1.230.0070.00417.42
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.36
8.1.190.0000.00917.23
8.1.180.0040.00418.10
8.1.170.0000.00818.58
8.1.160.0040.00422.01
8.1.150.0000.00718.76
8.1.140.0040.00417.46
8.1.130.0000.00817.61
8.1.120.0080.00017.39
8.1.110.0070.00017.30
8.1.100.0000.00817.41
8.1.90.0050.00317.32
8.1.80.0020.00517.35
8.1.70.0030.00517.51
8.1.60.0030.00717.60
8.1.50.0080.00017.57
8.1.40.0060.00317.53
8.1.30.0000.00817.68
8.1.20.0040.00417.68
8.1.10.0000.00717.55
8.1.00.0060.00317.44
8.0.300.0050.00518.77
8.0.290.0030.00616.75
8.0.280.0030.00318.51
8.0.270.0000.00717.25
8.0.260.0050.00317.21
8.0.250.0000.00716.98
8.0.240.0000.00616.99
8.0.230.0040.00417.07
8.0.220.0000.00716.88
8.0.210.0040.00416.90
8.0.200.0040.00416.92
8.0.190.0050.00216.88
8.0.180.0070.00017.03
8.0.170.0080.00016.96
8.0.160.0070.00017.02
8.0.150.0060.00316.89
8.0.140.0040.00416.86
8.0.130.0030.00313.34
8.0.120.0070.00016.87
8.0.110.0060.00316.99
8.0.100.0070.00016.89
8.0.90.0080.00016.89
8.0.80.0030.01316.85
8.0.70.0000.00816.95
8.0.60.0000.00816.80
8.0.50.0080.00016.85
8.0.30.0120.01017.06
8.0.20.0130.01017.40
8.0.10.0040.00417.09
8.0.00.0080.01416.81
7.4.330.0000.00715.08
7.4.320.0000.00616.59
7.4.300.0000.00616.54
7.4.290.0030.00516.48
7.4.280.0020.00516.49
7.4.270.0030.00316.51
7.4.260.0070.00316.47
7.4.250.0040.00416.53
7.4.240.0030.00416.56
7.4.230.0000.00716.42
7.4.220.0090.01116.57
7.4.210.0000.01516.46
7.4.200.0080.00016.67
7.4.160.0060.00916.61
7.4.150.0150.00317.40
7.4.140.0150.00617.86
7.4.130.0060.01216.52
7.4.120.0160.00316.56
7.4.110.0110.00716.42
7.4.100.0000.02216.68
7.4.90.0100.00716.55
7.4.80.0080.00819.39
7.4.70.0120.00716.43
7.4.60.0040.01216.54
7.4.50.0000.00816.49
7.4.40.0130.00516.53
7.4.30.0120.00616.46
7.4.00.0110.00415.06
7.3.330.0020.00313.18
7.3.320.0000.00513.30
7.3.310.0070.00016.38
7.3.300.0050.00216.27
7.3.290.0090.00916.35
7.3.280.0070.01316.37
7.3.270.0120.00617.40
7.3.260.0140.01016.57
7.3.250.0100.00616.45
7.3.240.0100.00616.36
7.3.230.0090.00916.39
7.3.210.0090.00616.36
7.3.200.0120.00616.71
7.3.190.0100.00616.39
7.3.180.0060.01116.54
7.3.170.0120.00916.49
7.3.160.0060.01216.49
7.2.330.0140.00416.70
7.2.320.0120.01216.78
7.2.310.0070.01016.72
7.2.300.0100.00716.79
7.2.290.0070.01416.84
7.2.80.0120.00816.82
7.2.60.0070.00717.02
7.2.00.0150.00719.32
7.1.200.0000.01015.67
7.1.100.0000.00918.14
7.1.70.0000.01017.32
7.1.60.0090.00919.17
7.1.50.0170.02034.80
7.1.00.0070.07322.51
7.0.200.0000.01014.60
7.0.60.0030.04319.91
7.0.50.0130.07017.89
7.0.40.0100.06719.96
7.0.30.0230.03720.20
7.0.20.0130.06720.24
7.0.10.0030.08720.10
7.0.00.0030.07320.06
5.6.280.0000.07320.79
5.6.210.0070.04020.75
5.6.200.0130.07718.14
5.6.190.0100.08020.39
5.6.180.0070.06020.33
5.6.170.0270.06720.47
5.6.160.0070.06320.47
5.6.150.0100.07718.22
5.6.140.0070.03718.24
5.6.130.0000.08718.28
5.6.120.0170.07321.00
5.6.110.0100.06720.96
5.6.100.0170.07720.96
5.6.90.0100.04321.00
5.6.80.0130.06020.36
5.6.70.4430.03720.52
5.5.350.0200.06020.48
5.5.340.0070.06717.99
5.5.330.0100.08320.43
5.5.320.0100.07320.38
5.5.310.0270.06720.24
5.5.300.0030.05017.98
5.5.290.0030.04018.07
5.5.280.0100.08020.80
5.5.270.0130.03320.89
5.5.260.0070.07020.79
5.5.250.0070.03720.50
5.5.240.0300.06720.25
5.4.450.0130.05719.58
5.4.440.0100.06019.55
5.4.430.0130.05319.54
5.4.420.0100.06019.16
5.4.410.0200.05719.57
5.4.400.0170.04719.29
5.4.390.0130.05719.05
5.4.380.0230.04319.26
5.4.370.0130.05319.32
5.4.360.0200.04718.97
5.4.350.0230.04319.21
5.4.340.0070.06019.12
5.4.320.0130.05319.10
5.4.310.0230.04018.97
5.4.300.0200.04019.14
5.4.290.0070.05719.00
5.4.280.0130.06018.88
5.4.270.0130.05018.97
5.4.260.0100.05719.37
5.4.250.0100.05319.36
5.4.240.0030.06019.32
5.4.230.0130.05019.14
5.4.220.0100.05718.96
5.4.210.0200.04319.27
5.4.200.0200.04719.27
5.4.190.0170.04719.05
5.4.180.0130.05019.21
5.4.170.0070.05719.27
5.4.160.0030.05718.95
5.4.150.0030.06019.36
5.4.140.0100.05316.53
5.4.130.0100.05016.37
5.4.120.0030.05716.29
5.4.110.0070.05316.43
5.4.100.0030.05316.53
5.4.90.0170.04316.61
5.4.80.0100.05016.26
5.4.70.0200.04316.55
5.4.60.0330.05316.43
5.4.50.0030.04016.38
5.4.40.0000.05016.16
5.4.30.0030.07016.52
5.4.20.0000.04316.34

preferences:
44.64 ms | 401 KiB | 5 Q