3v4l.org

run code in 300+ PHP versions simultaneously
<?php $function = function () { yield 0; }; $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.3.60.0140.00018.31
8.3.50.0040.01118.09
8.3.40.0130.00718.75
8.3.30.0040.01118.66
8.3.20.0040.00420.40
8.3.10.0040.01121.93
8.3.00.0080.00023.65
8.2.180.0110.01116.38
8.2.170.0120.00322.96
8.2.160.0070.00722.28
8.2.150.0030.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00720.87
8.2.110.0060.00622.31
8.2.100.0040.00817.72
8.2.90.0080.00317.63
8.2.80.0060.00318.82
8.2.70.0080.00017.50
8.2.60.0030.00617.92
8.2.50.0060.00318.07
8.2.40.0030.00719.86
8.2.30.0040.00418.09
8.2.20.0080.00017.92
8.2.10.0080.00019.29
8.2.00.0000.00721.09
8.1.280.0140.00025.92
8.1.270.0040.00420.69
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.14
8.1.230.0120.00022.76
8.1.220.0040.00417.74
8.1.210.0000.00818.90
8.1.200.0070.00317.35
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0040.00418.62
8.1.160.0000.00718.84
8.1.150.0000.00718.88
8.1.140.0070.00020.89
8.1.130.0030.00320.18
8.1.120.0020.00517.43
8.1.110.0000.00817.46
8.1.100.0030.00617.47
8.1.90.0040.00417.42
8.1.80.0000.00917.46
8.1.70.0020.00717.38
8.1.60.0040.00617.59
8.1.50.0040.00517.52
8.1.40.0040.00617.43
8.1.30.0050.00317.62
8.1.20.0050.00517.67
8.1.10.0050.00317.53
8.1.00.0050.00317.48
8.0.300.0030.00620.04
8.0.290.0000.01016.75
8.0.280.0080.00018.43
8.0.270.0000.00816.82
8.0.260.0000.00620.06
8.0.250.0050.00317.00
8.0.240.0040.00416.97
8.0.230.0040.00416.83
8.0.220.0060.00016.83
8.0.210.0050.00316.82
8.0.200.0050.00316.92
8.0.190.0050.00316.98
8.0.180.0040.00516.87
8.0.170.0060.00216.86
8.0.160.0070.00216.92
8.0.150.0050.00316.83
8.0.140.0020.00716.83
8.0.130.0030.00415.05
8.0.120.0020.00716.76
8.0.110.0000.00916.79
8.0.100.0040.00516.82
8.0.90.0020.00716.87
8.0.80.0040.00816.76
8.0.70.0030.00516.86
8.0.60.0010.00616.72
8.0.50.0040.00416.82
8.0.30.0040.01017.01
8.0.20.0080.00917.13
8.0.10.0030.00516.98
8.0.00.0080.00816.79
7.4.330.0060.00015.55
7.4.320.0000.00616.49
7.4.300.0070.00216.55
7.4.290.0030.00316.55
7.4.280.0070.00316.54
7.4.270.0050.00316.64
7.4.260.0040.00414.89
7.4.250.0050.00516.30
7.4.240.0080.00416.12
7.4.230.0050.00516.13
7.4.220.0050.00416.28
7.4.210.0060.00716.46
7.4.200.0040.00516.20
7.4.190.0050.01116.38
7.4.180.0100.00016.04
7.4.160.0090.00316.27
7.4.150.0060.00316.21
7.4.140.0090.00516.09
7.4.130.0100.00916.23
7.4.120.0060.01016.33
7.4.110.0110.00316.50
7.4.100.0080.00916.26
7.4.90.0050.01016.07
7.4.80.0100.00616.35
7.4.70.0050.01016.42
7.4.60.0090.00816.35
7.4.50.0100.00916.31
7.4.40.0110.00816.33
7.4.30.0100.00916.36
7.4.20.0110.00816.31
7.4.10.0090.00916.39
7.4.00.0100.00716.23
7.3.330.0090.00316.35
7.3.320.0090.00214.79
7.3.310.0090.00216.20
7.3.300.0080.00316.34
7.3.290.0060.00516.20
7.3.280.0140.00216.32
7.3.270.0100.00716.30
7.3.260.0080.00816.37
7.3.250.0100.00516.37
7.3.240.0090.00816.29
7.3.230.0110.00616.41
7.3.220.0080.00616.23
7.3.210.0100.00616.36
7.3.200.0080.01016.44
7.3.190.0090.00616.25
7.3.180.0120.00716.37
7.3.170.0110.00916.31
7.3.160.0110.00716.28
7.3.150.0120.00716.42
7.3.140.0110.00816.35
7.3.130.0100.00916.36
7.3.120.0090.00916.17
7.3.110.0100.00816.12
7.3.100.0100.00716.07
7.3.90.0090.00816.18
7.3.80.0100.00815.95
7.3.70.0090.00815.95
7.3.60.0100.00715.94
7.3.50.0090.00815.95
7.3.40.0100.00715.94
7.3.30.0090.00815.95
7.3.20.0140.00716.35
7.3.10.0170.00816.37
7.3.00.0130.00616.37
7.2.340.0120.00316.29
7.2.330.0090.00716.55
7.2.320.0120.00316.46
7.2.310.0100.01016.55
7.2.300.0100.01016.52
7.2.290.0100.00916.52
7.2.280.0110.00816.58
7.2.270.0110.00916.57
7.2.260.0110.00916.57
7.2.250.0100.00916.45
7.2.240.0090.00916.39
7.2.230.0100.00816.39
7.2.220.0110.00716.37
7.2.210.0100.00816.18
7.2.200.0090.00916.14
7.2.190.0110.00716.13
7.2.180.0100.00916.14
7.2.170.0100.00816.12
7.2.160.0090.00916.28
7.2.150.0130.00816.65
7.2.140.0100.01016.57
7.2.130.0110.01016.62
7.2.120.0140.00816.58
7.2.110.0110.00916.63
7.2.100.0120.00816.60
7.2.90.0110.00816.66
7.2.80.0120.00916.63
7.2.70.0110.00916.59
7.2.60.0110.00916.60
7.2.50.0100.01016.57
7.2.40.0120.00916.65
7.2.30.0150.00816.72
7.2.20.0110.01016.59
7.2.10.0110.00916.58
7.2.00.0110.00916.58
7.1.330.0140.00915.69
7.1.320.0150.00915.63
7.1.310.0130.00915.60
7.1.300.0130.00815.51
7.1.290.0130.00915.54
7.1.280.0140.00815.50
7.1.270.0130.00915.49
7.1.260.0140.00815.50
7.1.250.0130.01015.44
7.1.240.0190.00815.51
7.1.230.0160.00715.49
7.1.220.0200.00915.57
7.1.210.0170.00815.49
7.1.200.0180.00615.55
7.1.190.0180.00815.54
7.1.180.0170.00815.59
7.1.170.0170.00715.54
7.1.160.0170.00915.52
7.1.150.0160.00915.52
7.1.140.0150.00815.54
7.1.130.0160.00915.52
7.1.120.0150.01015.55
7.1.110.0160.00915.56
7.1.100.0130.01015.54
7.1.90.0170.00915.54
7.1.80.0140.00915.56
7.1.70.0150.00915.52
7.1.60.0130.00915.59
7.1.50.0160.00815.55
7.1.40.0150.00915.61
7.1.30.0130.00915.54
7.1.20.0130.00915.58
7.1.10.0150.00715.57
7.1.00.0130.00715.51

preferences:
55.63 ms | 401 KiB | 5 Q