3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen($x) { yield $x; return $x * 5; } function yf() { yield from gen(1); yield from gen(2); return yield from gen(42); } $g = yf(); foreach($g as $val) { var_dump($val); } echo "====================\n"; var_dump($g->getReturn());

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.0180.00416.38
8.3.50.0240.01022.04
8.3.40.0070.00718.68
8.3.30.0120.00618.54
8.3.20.0140.00020.16
8.3.10.0050.00323.66
8.3.00.0080.00019.13
8.2.180.0140.00718.16
8.2.170.0130.00722.96
8.2.160.0130.00320.38
8.2.150.0030.01324.18
8.2.140.0000.00724.66
8.2.130.0050.00517.50
8.2.120.0080.00026.35
8.2.110.0060.00320.56
8.2.100.0110.00017.72
8.2.90.0080.00019.23
8.2.80.0050.00317.97
8.2.70.0030.00617.38
8.2.60.0050.00317.77
8.2.50.0030.00518.07
8.2.40.0040.00419.41
8.2.30.0040.00420.54
8.2.20.0000.00717.56
8.2.10.0040.00417.98
8.2.00.0070.00018.01
8.1.280.0140.00025.92
8.1.270.0070.01121.98
8.1.260.0110.00428.09
8.1.250.0080.00028.09
8.1.240.0110.00023.90
8.1.230.0110.00022.20
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00917.38
8.1.190.0030.00917.23
8.1.180.0060.00318.10
8.1.170.0040.00418.49
8.1.160.0040.00421.91
8.1.150.0000.00718.84
8.1.140.0040.00419.61
8.1.130.0070.00017.61
8.1.120.0030.00617.46
8.1.110.0040.00417.50
8.1.100.0040.00417.34
8.1.90.0000.00717.41
8.1.80.0050.00317.44
8.1.70.0030.00317.46
8.1.60.0100.00017.64
8.1.50.0060.00317.52
8.1.40.0040.00417.50
8.1.30.0000.00817.54
8.1.20.0040.00417.58
8.1.10.0040.00417.54
8.1.00.0050.00317.33
8.0.300.0030.00618.77
8.0.290.0060.00316.75
8.0.280.0050.00218.50
8.0.270.0000.00717.16
8.0.260.0030.00317.25
8.0.250.0000.00716.97
8.0.240.0060.00016.98
8.0.230.0000.00716.95
8.0.220.0050.00316.92
8.0.210.0030.00616.80
8.0.200.0030.00316.95
8.0.190.0040.00416.93
8.0.180.0040.00416.82
8.0.170.0000.00716.90
8.0.160.0030.00316.96
8.0.150.0070.00016.87
8.0.140.0030.00716.74
8.0.130.0030.00313.31
8.0.120.0040.00416.75
8.0.110.0000.00816.78
8.0.100.0070.00016.91
8.0.90.0000.00717.00
8.0.80.0040.01216.93
8.0.70.0000.00816.74
8.0.60.0050.00216.89
8.0.50.0040.00416.75
8.0.30.0100.01017.11
8.0.20.0130.01017.40
8.0.10.0000.00717.13
8.0.00.0090.01016.83
7.4.330.0050.00015.15
7.4.320.0000.00616.41
7.4.300.0030.00316.42
7.4.290.0030.00316.42
7.4.280.0040.00416.59
7.4.270.0000.00716.44
7.4.260.0000.00716.58
7.4.250.0000.00816.46
7.4.240.0050.00216.54
7.4.230.0030.00316.67
7.4.220.0110.00616.53
7.4.210.0110.00816.56
7.4.200.0000.00716.68
7.4.160.0060.00916.45
7.4.150.0150.00817.40
7.4.140.0130.00417.86
7.4.130.0090.00916.53
7.4.120.0080.01216.51
7.4.110.0070.01716.78
7.4.100.0000.01716.62
7.4.90.0140.00616.70
7.4.80.0150.00319.39
7.4.70.0100.01016.45
7.4.60.0090.00616.43
7.4.50.0000.00416.41
7.4.40.0140.00316.63
7.4.30.0100.00716.34
7.4.00.0000.01815.12
7.3.330.0030.00313.29
7.3.320.0000.00513.25
7.3.310.0000.00716.22
7.3.300.0000.00716.33
7.3.290.0000.00716.24
7.3.280.0100.00616.36
7.3.270.0030.01417.40
7.3.260.0100.00716.28
7.3.250.0050.01316.39
7.3.240.0060.01016.25
7.3.230.0070.01016.39
7.3.210.0100.00616.48
7.3.200.0200.00016.39
7.3.190.0030.01216.43
7.3.180.0030.01516.56
7.3.170.0060.01316.48
7.3.160.0060.01016.48
7.3.10.0090.00316.69
7.3.00.0060.00316.45
7.2.330.0120.00616.50
7.2.320.0090.00916.74
7.2.310.0030.01316.83
7.2.300.0150.00916.61
7.2.290.0140.00516.73
7.2.130.0030.01016.77
7.2.120.0060.00616.60
7.2.110.0070.00716.69
7.2.100.0040.01216.56
7.2.90.0070.00717.01
7.2.80.0080.00416.90
7.2.70.0030.01016.73
7.2.60.0110.00516.81
7.2.50.0090.00916.98
7.2.40.0000.01216.77
7.2.30.0080.00316.95
7.2.20.0120.00617.14
7.2.10.0070.00316.91
7.2.00.0010.01118.06
7.1.250.0070.00415.30
7.1.200.0100.00015.86
7.1.100.0030.01218.26
7.1.70.0050.00317.14
7.1.60.0070.01619.48
7.1.50.0090.01216.80
7.1.00.0130.06322.50
7.0.200.0170.00714.73
7.0.60.0070.06320.03
7.0.50.0170.07717.98
7.0.40.0070.08720.30
7.0.30.0230.05320.15
7.0.20.0330.07320.21
7.0.10.0030.07720.19
7.0.00.0030.04320.16
5.6.280.0030.06720.90
5.6.210.0100.06020.47
5.6.200.0100.07318.16
5.6.190.0100.08020.61
5.6.180.0230.08320.61
5.6.170.0170.04320.47
5.6.160.0070.06720.46
5.6.150.0030.04018.18
5.6.140.0170.07018.28
5.6.130.0000.04718.12
5.6.120.0000.05320.99
5.6.110.0030.04321.02
5.6.100.0000.06320.96
5.6.90.0070.04320.93
5.6.80.0030.03720.36
5.5.350.3570.04020.52
5.5.340.0000.04317.99
5.5.330.0070.08320.46
5.5.320.0100.07020.42
5.5.310.0330.06020.36
5.5.300.0100.08017.98
5.5.290.0230.06317.98
5.5.280.0000.09020.88
5.5.270.0070.06720.88
5.5.260.0070.06320.88
5.5.250.0030.05020.66
5.5.240.0130.08320.19

preferences:
59.96 ms | 401 KiB | 5 Q