3v4l.org

run code in 300+ PHP versions simultaneously
<?php $function = function () { yield 0; yield 1; }; $wrapper = function () use ($function) { $generator = $function(); $generator->valid(); yield from $generator; $generator = $function(); // Comment out this line to get the correct result. $generator->valid(); yield from $generator; }; foreach ($wrapper() as $value) { echo $value; }

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.0120.00716.40
8.5.00.0050.00419.92
8.4.160.0120.00923.96
8.4.150.0020.00014.05
8.4.140.0150.00617.54
8.4.130.0110.01017.98
8.4.120.0130.00820.84
8.4.110.0140.00922.51
8.4.100.0100.00717.94
8.4.90.0130.00818.64
8.4.80.0120.00917.66
8.4.70.0050.00317.63
8.4.60.0140.00618.95
8.4.50.0090.00719.30
8.4.40.0090.00017.73
8.4.30.0080.00020.17
8.4.20.0080.00818.00
8.4.10.0090.00619.59
8.3.280.0130.00718.18
8.3.270.0110.00816.45
8.3.260.0130.00616.62
8.3.250.0100.00918.75
8.3.240.0130.00616.55
8.3.230.0120.00816.55
8.3.220.0100.00917.31
8.3.210.0090.00116.50
8.3.200.0040.00616.70
8.3.190.0130.00517.09
8.3.180.0100.00816.57
8.3.170.0120.00319.21
8.3.160.0080.01118.20
8.3.150.0070.01120.49
8.3.140.0080.00018.52
8.3.130.0040.00416.61
8.3.120.0080.00020.75
8.3.110.0130.00720.94
8.3.100.0090.00316.66
8.3.90.0090.00626.77
8.3.80.0090.00016.50
8.3.70.0090.00616.63
8.3.60.0110.00716.63
8.3.50.0100.01024.40
8.3.40.0070.00719.23
8.3.30.0110.00318.84
8.3.20.0040.00421.90
8.3.10.0000.00822.14
8.3.00.0000.00723.43
8.2.290.0130.00620.44
8.2.280.0080.00118.31
8.2.270.0070.01117.26
8.2.260.0040.00416.78
8.2.250.0050.00318.44
8.2.240.0080.00018.91
8.2.230.0040.00422.58
8.2.220.0030.00724.06
8.2.210.0040.00426.77
8.2.200.0060.00316.50
8.2.190.0030.01716.58
8.2.180.0110.00716.38
8.2.170.0090.00622.96
8.2.160.0100.00320.95
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00020.97
8.2.110.0030.00620.92
8.2.100.0040.00817.78
8.2.90.0060.00317.91
8.2.80.0030.00618.03
8.2.70.0030.00517.50
8.2.60.0090.00017.50
8.2.50.0040.00417.63
8.2.40.0050.00218.22
8.2.30.0000.00717.95
8.2.20.0040.00418.10
8.2.10.0080.00019.29
8.2.00.0000.00719.46
8.1.330.0100.00921.91
8.1.320.0060.00416.02
8.1.310.0000.00816.89
8.1.300.0060.00318.34
8.1.290.0060.00330.84
8.1.280.0040.01125.92
8.1.270.0060.00322.06
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.97
8.1.230.0060.00622.75
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.22
8.1.180.0030.00618.10
8.1.170.0030.00617.62
8.1.160.0040.00418.76
8.1.150.0000.00719.00
8.1.140.0040.00418.85
8.1.130.0030.00320.10
8.1.120.0070.00017.38
8.1.110.0030.00617.50
8.1.100.0000.00717.46
8.1.90.0050.00317.46
8.1.80.0040.00417.41
8.1.70.0040.00417.45
8.1.60.0030.00517.46
8.1.50.0040.00417.43
8.1.40.0050.00317.52
8.1.30.0080.00217.42
8.1.20.0000.00817.66
8.1.10.0040.00417.66
8.1.00.0040.00717.56
8.0.300.0070.00019.98
8.0.290.0000.00716.63
8.0.280.0000.00818.38
8.0.270.0030.00317.92
8.0.260.0040.00421.86
8.0.250.0050.00316.85
8.0.240.0030.00316.78
8.0.230.0070.00016.92
8.0.220.0040.00416.89
8.0.210.0030.00316.86
8.0.200.0000.00616.83
8.0.190.0030.00516.95
8.0.180.0050.00316.97
8.0.170.0050.00316.91
8.0.160.0040.00316.88
8.0.150.0030.00616.71
8.0.140.0040.00316.73
8.0.130.0060.00013.30
8.0.120.0060.00316.86
8.0.110.0030.00316.92
8.0.100.0030.00616.95
8.0.90.0030.00617.00
8.0.80.0090.00716.83
8.0.70.0000.00716.70
8.0.60.0080.00016.76
8.0.50.0050.00216.78
8.0.30.0150.00916.91
8.0.20.0080.01317.07
8.0.10.0000.00816.79
8.0.00.0030.01316.93
7.4.330.0050.00015.55
7.4.320.0000.00616.55
7.4.300.0000.00616.50
7.4.290.0050.00316.59
7.4.280.0060.00316.57
7.4.270.0060.00016.64
7.4.260.0060.00013.21
7.4.250.0000.00816.45
7.4.240.0050.00216.42
7.4.230.0080.00016.34
7.4.220.0030.00316.61
7.4.210.0110.00416.61
7.4.200.0070.00016.48
7.4.130.0050.01316.61
7.4.120.0100.00716.49
7.4.110.0200.00316.68
7.4.100.0070.01016.43
7.4.90.0030.01316.39
7.4.80.0170.00419.39
7.4.70.0090.00616.48
7.4.60.0080.01016.57
7.4.50.0110.00816.50
7.4.40.0100.00916.43
7.4.30.0110.00716.49
7.4.20.0100.01016.43
7.4.10.0110.00716.57
7.4.00.0100.00716.46
7.3.330.0000.00716.26
7.3.320.0030.00313.37
7.3.310.0030.00316.16
7.3.300.0050.00216.18
7.3.290.0080.00716.27
7.3.280.0060.01316.25
7.3.260.0110.00716.32
7.3.240.0130.00716.47
7.3.230.0030.01416.48
7.3.210.0130.00916.52
7.3.200.0030.01316.36
7.3.190.0100.00716.34
7.3.180.0060.01116.33
7.3.170.0090.00916.38
7.3.160.0070.01116.36
7.3.150.0090.01016.41
7.3.140.0080.01016.34
7.3.130.0070.01216.33
7.3.120.0070.01016.32
7.3.110.0120.00716.40
7.3.100.0080.01016.30
7.3.90.0090.00816.45
7.3.80.0120.00816.46
7.3.70.0110.00916.40
7.3.60.0120.00516.38
7.3.50.0080.01116.32
7.3.40.0090.01116.38
7.3.30.0080.01216.30
7.3.20.0100.00916.34
7.3.10.0110.00616.41
7.3.00.0150.00916.47
7.2.330.0110.00716.67
7.2.320.0110.00716.83
7.2.310.0080.00916.63
7.2.300.0090.00816.66
7.2.290.0130.00716.63
7.2.280.0110.00616.57
7.2.270.0090.01316.58
7.2.260.0080.00916.52
7.2.250.0060.01116.65
7.2.240.0110.00916.57
7.2.230.0100.00916.61
7.2.220.0090.01116.60
7.2.210.0090.01216.55
7.2.200.0100.01016.61
7.2.190.0100.00916.58
7.2.180.0060.01516.68
7.2.170.0080.01116.56
7.2.160.0090.01116.62
7.2.150.0110.00816.67
7.2.140.0100.00716.62
7.2.130.0090.00716.68
7.2.120.0100.00916.70
7.2.110.0110.00816.70
7.2.100.0080.01116.63
7.2.90.0080.01116.70
7.2.80.0150.00916.67
7.2.70.0090.00916.64
7.2.60.0120.00816.71
7.2.50.0120.00716.66
7.2.40.0130.00816.68
7.2.30.0110.00916.66
7.2.20.0120.00616.69
7.2.10.0150.00716.60
7.2.00.0100.01016.65

preferences:
154.5 ms | 403 KiB | 5 Q