3v4l.org

run code in 300+ PHP versions simultaneously
<?php function routeIterator(&$path) { while (!empty($path)) { yield $path[0]; array_shift($path); } } function exampleGenerator($path) { foreach ($routeIterator($path) as $chunk) { yield "Chunk: " . $chunk; echo " Sent value: " . yield . "\n"; } } foreach (exampleGenerator([1,2,3,4,5]) as $signal) { echo $signal; }

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.0090.01218.56
8.3.50.0060.00917.93
8.3.40.0120.00318.96
8.3.30.0040.01118.70
8.3.20.0070.00020.29
8.3.10.0000.00820.66
8.3.00.0000.00723.61
8.2.180.0140.00416.50
8.2.170.0070.00722.96
8.2.160.0100.01022.17
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00721.04
8.2.120.0040.00426.35
8.2.110.0000.01020.84
8.2.100.0080.00417.83
8.2.90.0080.00318.97
8.2.80.0040.00417.97
8.2.70.0080.00017.75
8.2.60.0080.00017.93
8.2.50.0080.00018.09
8.2.40.0030.00520.59
8.2.30.0000.00719.51
8.2.20.0040.00417.81
8.2.10.0070.00018.14
8.2.00.0040.00417.95
8.1.280.0070.00725.92
8.1.270.0070.00023.97
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0040.00422.69
8.1.230.0030.00917.42
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0080.00017.13
8.1.180.0040.00418.10
8.1.170.0000.00818.54
8.1.160.0040.00420.74
8.1.150.0070.00318.71
8.1.140.0080.00019.48
8.1.130.0030.00317.69
8.1.120.0000.00717.43
8.1.110.0000.00717.41
8.1.100.0070.00017.30
8.1.90.0040.00417.39
8.1.80.0070.00017.44
8.1.70.0030.00317.29
8.1.60.0070.00417.48
8.1.50.0040.00417.35
8.1.40.0040.00417.48
8.1.30.0030.00517.58
8.1.20.0060.00317.34
8.1.10.0000.00717.54
8.1.00.0060.00317.36
8.0.300.0060.00318.77
8.0.290.0070.00016.75
8.0.280.0070.00018.45
8.0.270.0030.00317.18
8.0.260.0000.00717.23
8.0.250.0030.00316.99
8.0.240.0000.00717.04
8.0.230.0040.00417.06
8.0.220.0030.00316.84
8.0.210.0070.00016.99
8.0.200.0000.00616.95
8.0.190.0040.00417.00
8.0.180.0100.00016.95
8.0.170.0070.00016.98
8.0.160.0000.00716.96
8.0.150.0000.00716.77
8.0.140.0040.00716.91
8.0.130.0060.00013.41
8.0.120.0000.00916.91
8.0.110.0060.00316.97
8.0.100.0040.00416.96
8.0.90.0040.00417.03
8.0.80.0070.00716.91
8.0.70.0070.00016.96
8.0.60.0040.00416.91
8.0.50.0000.00716.87
8.0.30.0090.01017.03
8.0.20.0100.00817.40
8.0.10.0000.00816.85
8.0.00.0070.01116.72
7.4.330.0050.00016.81
7.4.320.0000.00616.54
7.4.300.0040.00416.51
7.4.290.0030.00316.52
7.4.280.0000.00716.44
7.4.270.0040.00416.66
7.4.260.0020.00516.63
7.4.250.0020.00516.62
7.4.240.0030.00316.56
7.4.230.0040.00216.49
7.4.220.0150.00316.45
7.4.210.0060.00916.61
7.4.200.0070.00016.63
7.4.160.0080.00816.46
7.4.150.0070.01117.40
7.4.140.0090.01017.86
7.4.130.0110.00716.63
7.4.120.0090.01416.46
7.4.110.0030.01316.36
7.4.100.0030.01416.33
7.4.90.0090.00916.50
7.4.80.0070.01319.39
7.4.70.0040.01316.67
7.4.60.0100.00616.58
7.4.50.0070.00816.35
7.4.40.0080.00816.57
7.4.30.0160.00316.28
7.4.00.0070.01114.86
7.3.330.0030.00313.09
7.3.320.0050.00013.17
7.3.310.0040.00416.35
7.3.300.0070.00016.32
7.3.290.0030.00316.31
7.3.280.0100.00916.32
7.3.270.0060.01517.40
7.3.260.0120.00616.57
7.3.250.0080.01116.41
7.3.240.0090.00816.46
7.3.230.0150.01216.39
7.3.210.0110.00616.58
7.3.200.0130.00316.43
7.3.190.0080.00816.42
7.3.180.0030.01416.47
7.3.170.0050.01116.30
7.3.160.0090.00616.16
7.2.330.0080.01116.68
7.2.320.0070.01716.46
7.2.310.0030.02016.32
7.2.300.0130.00316.27
7.2.290.0090.00916.54
7.2.80.0040.01116.49
7.2.60.0030.00816.89
7.2.00.0070.00319.38
7.1.200.0030.01015.51
7.1.100.0060.00618.05
7.1.70.0040.00417.09
7.1.60.0110.01119.27
7.1.50.0030.01016.88
7.1.00.0030.09022.43
7.0.200.0000.00816.66
7.0.60.0330.05020.04
7.0.50.0070.04717.92
7.0.40.0170.06720.23
7.0.30.0430.07320.07
7.0.20.0230.04720.21
7.0.10.0070.07720.09
7.0.00.0100.05720.30
5.6.210.0200.05720.67
5.6.200.0030.08718.14
5.6.190.0070.07720.50
5.6.180.0300.07320.33
5.6.170.0370.07720.39
5.6.160.0070.07320.45
5.6.150.0000.07318.17
5.6.140.0100.07718.11
5.6.130.0100.06318.16
5.6.120.0070.08721.06
5.6.110.0130.07720.99
5.6.100.0170.07021.14
5.6.90.0000.05020.99
5.6.80.0030.07320.40
5.5.350.0300.06020.31
5.5.340.0030.05317.98
5.5.330.0070.07320.27
5.5.320.0330.06020.27
5.5.310.0230.06720.27
5.5.300.0100.07317.95
5.5.290.0030.04017.95
5.5.280.0130.05020.82
5.5.270.0100.08020.85
5.5.260.0070.06320.88
5.5.250.0030.09020.50
5.5.240.0030.03720.36

preferences:
57.65 ms | 401 KiB | 5 Q