3v4l.org

run code in 300+ PHP versions simultaneously
<?php function traverse(array $items): Generator { if (!empty($items)) { yield $items[0]; array_shift($items); yield from traverse($items); } } $values = traverse(['a', 'b', 'c', 'd', 'e']); foreach ($values as $key => $value) { echo "{$key} => {$value}", PHP_EOL; }

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.5.10.0050.00318.55
8.5.00.0130.01120.00
8.4.150.0030.00014.05
8.4.140.0110.01217.65
8.4.130.0110.00818.68
8.4.120.0090.00824.08
8.4.110.0110.00918.59
8.4.100.0130.00718.95
8.4.90.0150.00620.71
8.4.80.0110.01018.88
8.4.70.0120.00818.95
8.4.60.0120.00718.86
8.4.50.0110.00418.76
8.4.40.0200.00017.90
8.4.30.0130.00720.39
8.4.20.0100.01017.70
8.4.10.0060.00319.44
8.3.280.0090.01118.30
8.3.270.0110.01016.35
8.3.260.0100.00916.51
8.3.250.0130.00619.00
8.3.240.0140.00517.18
8.3.230.0050.00516.67
8.3.220.0090.00718.96
8.3.210.0110.00918.55
8.3.200.0060.00316.50
8.3.190.0090.00917.01
8.3.180.0070.00418.93
8.3.170.0100.00716.73
8.3.160.0070.00016.99
8.3.150.0060.01216.80
8.3.140.0040.00718.85
8.3.130.0030.00618.36
8.3.120.0000.00818.93
8.3.110.0040.00416.78
8.3.100.0030.00616.45
8.3.90.0080.00026.77
8.3.80.0050.00516.53
8.3.70.0150.00316.58
8.3.60.0120.00316.50
8.3.50.0070.01117.79
8.3.40.0070.01320.30
8.3.30.0110.00418.66
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0070.00026.16
8.2.290.0110.00720.68
8.2.280.0060.00918.37
8.2.270.0090.00916.66
8.2.260.0030.00516.49
8.2.250.0040.00416.79
8.2.240.0100.01318.60
8.2.230.0030.00720.94
8.2.220.0000.01024.06
8.2.210.0040.00426.77
8.2.200.0070.00416.75
8.2.190.0160.00316.62
8.2.180.0070.00725.92
8.2.170.0030.01218.95
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0110.00726.16
8.2.120.0040.00426.16
8.2.110.0090.00021.04
8.2.100.0120.00017.91
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0030.00517.49
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0000.00819.95
8.2.30.0070.00018.04
8.2.20.0040.00420.30
8.2.10.0050.00317.63
8.2.00.0000.00719.18
8.1.330.0130.00722.10
8.1.320.0070.01216.21
8.1.310.0040.00416.14
8.1.300.0130.00316.22
8.1.290.0060.00330.84
8.1.280.0130.00925.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00321.84
8.1.230.0030.00921.03
8.1.220.0040.00417.74
8.1.210.0060.00318.78
8.1.200.0030.00617.35
8.1.190.0030.00517.70
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0040.00418.77
8.1.150.0000.00718.68
8.1.140.0040.00417.31
8.1.130.0000.00718.92
8.1.120.0070.00317.44
8.1.110.0040.00417.52
8.1.100.0050.00317.47
8.1.90.0040.00417.47
8.1.80.0000.00917.49
8.1.70.0000.00717.37
8.1.60.0080.00017.43
8.1.50.0080.00017.55
8.1.40.0040.00417.54
8.1.30.0000.00917.62
8.1.20.0050.00317.70
8.1.10.0090.00317.40
8.1.00.0170.00617.35
8.0.300.0040.00419.94
8.0.290.0030.00616.63
8.0.280.0070.00018.50
8.0.270.0050.00316.74
8.0.260.0000.00618.50
8.0.250.0070.00016.99
8.0.240.0040.00416.87
8.0.230.0000.00716.96
8.0.220.0030.00316.91
8.0.210.0000.00716.77
8.0.200.0000.00716.94
8.0.190.0090.00316.99
8.0.180.0070.00016.89
8.0.170.0060.00316.91
8.0.160.0050.00216.90
8.0.150.0000.00716.83
8.0.140.0170.00316.71
8.0.130.0130.00616.86
8.0.120.0160.00316.76
8.0.110.0120.00616.78
8.0.100.0140.00516.70
8.0.90.0130.00716.70
8.0.80.0130.00616.87
8.0.70.0130.00816.68
8.0.60.0160.00316.79
8.0.50.0150.00516.80
8.0.30.0130.00616.74
8.0.20.0180.00416.94
8.0.10.0180.00316.96
8.0.00.0050.00517.04
7.4.330.0000.00515.55
7.4.320.0050.00216.57
7.4.300.0050.00316.64
7.4.290.0050.00216.45
7.4.280.0040.00416.50
7.4.270.0210.00416.58
7.4.260.0180.00516.51
7.4.250.0170.00716.52
7.4.240.0190.00316.55
7.4.230.0170.00416.41
7.4.220.0180.00016.41
7.4.210.0150.00316.56
7.4.200.0170.00016.47
7.4.190.0180.00016.67
7.4.180.0120.00816.47
7.4.160.0170.00316.61
7.4.150.0170.00016.55
7.4.140.0150.00316.45
7.4.130.0190.00016.26
7.4.120.0130.00616.56
7.4.110.0080.00816.38
7.4.100.0140.00316.46
7.4.90.0140.00316.41
7.4.80.0130.00716.46
7.4.70.0080.00816.47
7.4.60.0150.00316.56
7.4.50.0110.00716.30
7.4.40.0110.00716.23
7.4.30.0130.00316.44
7.4.20.0140.00016.42
7.4.10.0180.00016.43
7.4.00.0100.00316.27
7.3.330.0110.00516.21
7.3.320.0180.00216.38
7.3.310.0070.01016.39
7.3.300.0110.00516.16
7.3.290.0120.00616.32
7.3.280.0150.00316.23
7.3.270.0040.01116.28
7.3.260.0110.00316.28
7.3.250.0090.00416.25
7.3.240.0160.00016.36
7.3.230.0100.00716.33
7.3.220.0110.01016.23
7.3.210.0140.00616.16
7.3.200.0090.00716.36
7.3.190.0120.00016.13
7.3.180.0130.00516.32
7.3.170.0070.00716.14
7.3.160.0140.00516.13
7.3.150.0080.00816.16
7.3.140.0130.00516.08
7.3.130.0140.00016.08

preferences:
38.12 ms | 403 KiB | 5 Q