3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { echo 'start'; yield 'middle'; echo 'end'; } // Initial call does not output anything $gen = gen(); // Call to current() resumes the generator, thus "start" is echo'd. // Then the yield expression is hit and the string "middle" is returned // as the result of current() and then echo'd. echo $gen->current(); // Execution of the generator is resumed again, thus echoing "end" $gen->next();

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.00616.38
8.3.50.0160.00716.42
8.3.40.0060.01320.25
8.3.30.0080.00818.50
8.3.20.0030.00618.63
8.3.10.0090.00018.82
8.3.00.0080.00019.25
8.2.180.0140.00725.92
8.2.170.0070.00718.84
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0000.00720.79
8.2.110.0050.00521.00
8.2.100.0040.00717.72
8.2.90.0060.00319.39
8.2.80.0040.00419.25
8.2.70.0040.00417.50
8.2.60.0090.00017.93
8.2.50.0060.00318.07
8.2.40.0040.00419.88
8.2.30.0040.00417.57
8.2.20.0050.00517.68
8.2.10.0080.00017.79
8.2.00.0040.00417.70
8.1.280.0070.01125.92
8.1.270.0080.00023.99
8.1.260.0100.00726.35
8.1.250.0060.00328.09
8.1.240.0000.00922.53
8.1.230.0070.00320.97
8.1.220.0030.00617.74
8.1.210.0040.00418.85
8.1.200.0030.00717.35
8.1.190.0000.00817.35
8.1.180.0050.00518.10
8.1.170.0050.00518.69
8.1.160.0000.00819.02
8.1.150.0070.00018.59
8.1.140.0040.00417.40
8.1.130.0040.00417.91
8.1.120.0000.00717.43
8.1.110.0000.00817.44
8.1.100.0040.00417.45
8.1.90.0070.00017.43
8.1.80.0070.00017.45
8.1.70.0030.00317.40
8.1.60.0000.00917.57
8.1.50.0000.00717.48
8.1.40.0040.00417.50
8.1.30.0030.00617.64
8.1.20.0030.00617.70
8.1.10.0050.00317.56
8.1.00.0080.00017.43
8.0.300.0000.00719.94
8.0.290.0060.00316.75
8.0.280.0000.00718.49
8.0.270.0050.00217.29
8.0.260.0030.00316.82
8.0.250.0040.00417.00
8.0.240.0000.00716.92
8.0.230.0000.00716.89
8.0.220.0000.00716.84
8.0.210.0030.00316.94
8.0.200.0000.00716.94
8.0.190.0040.00416.94
8.0.180.0040.00416.97
8.0.170.0040.00416.79
8.0.160.0030.00316.91
8.0.150.0030.00616.79
8.0.140.0060.00616.79
8.0.130.0060.00013.28
8.0.120.0060.00316.85
8.0.110.0040.00416.78
8.0.100.0080.00016.72
8.0.90.0040.00416.85
8.0.80.0070.00716.89
8.0.70.0000.00816.89
8.0.60.0030.00616.70
8.0.50.0000.00716.87
8.0.30.0120.00917.11
8.0.20.0070.01516.82
8.0.10.0000.00716.96
8.0.00.0050.01416.70
7.4.330.0000.00512.95
7.4.320.0000.00716.51
7.4.300.0060.00016.62
7.4.290.0030.00316.63
7.4.280.0080.00016.46
7.4.270.0000.00616.66
7.4.260.0000.00613.29
7.4.250.0050.00316.47
7.4.240.0070.00016.44
7.4.230.0000.00716.32
7.4.220.0040.01216.54
7.4.210.0110.00316.40
7.4.200.0050.00316.35
7.4.190.0040.00416.36
7.4.160.0060.01216.64
7.4.150.0120.00616.39
7.4.140.0060.01216.43
7.4.130.0130.00316.43
7.4.120.0130.00316.63
7.4.110.0100.01016.55
7.4.100.0060.01116.48
7.4.90.0100.01016.43
7.4.80.0130.00619.39
7.4.70.0120.00316.60
7.4.60.0130.00316.44
7.4.50.0040.00816.11
7.4.40.0040.01116.48
7.4.30.0100.00716.54
7.4.00.0090.00614.90
7.3.330.0030.00313.10
7.3.320.0000.00513.08
7.3.310.0070.00016.18
7.3.300.0030.00316.28
7.3.290.0070.00716.24
7.3.280.0110.01116.26
7.3.270.0140.00416.33
7.3.260.0110.00816.64
7.3.250.0140.00816.35
7.3.240.0080.00816.50
7.3.230.0130.01016.25
7.3.210.0130.00316.49
7.3.200.0110.00416.47
7.3.190.0150.00316.39
7.3.180.0060.00916.51
7.3.170.0090.01316.15
7.3.160.0040.01316.69
7.3.120.0040.01414.97
7.2.330.0110.00716.66
7.2.320.0160.00616.32
7.2.310.0090.00916.33
7.2.300.0080.01516.58
7.2.290.0070.01016.49
7.2.00.0000.01119.43
7.1.100.0040.01118.03
7.1.70.0050.00217.25
7.1.60.0130.01019.30
7.1.50.0030.01716.57
7.1.00.0030.07322.42
7.0.200.0030.01016.29
7.0.140.0030.07322.09
7.0.120.0030.06722.04
7.0.60.0200.06719.82
7.0.50.0070.04717.86
7.0.40.0030.04320.32
7.0.30.0270.08020.26
7.0.20.0300.07720.15
7.0.10.0300.09020.12
7.0.00.0000.05320.16
5.6.280.0070.07020.90
5.6.210.0170.06720.71
5.6.200.0130.04718.18
5.6.190.0100.08320.39
5.6.180.0230.04720.65
5.6.170.0370.08020.55
5.6.160.0030.08720.50
5.6.150.0170.07018.16
5.6.140.0070.08018.21
5.6.130.0070.07318.13
5.6.120.0100.08320.89
5.6.110.0100.06720.98
5.6.100.0030.08320.98
5.6.90.0070.08720.98
5.6.80.0130.08020.39
5.5.350.0130.07720.29
5.5.340.0070.05718.07
5.5.330.0030.08720.37
5.5.320.0030.08020.28
5.5.310.0300.06720.38
5.5.300.0030.06018.09
5.5.290.0030.04718.07
5.5.280.0130.03020.87
5.5.270.0130.08020.95
5.5.260.0030.04020.84
5.5.250.0100.03720.70
5.5.240.0030.07020.07
5.4.450.0100.08019.41
5.4.440.0100.06319.47
5.4.430.0070.03719.47
5.4.420.0070.03719.24
5.4.410.0130.04319.46
5.4.400.0000.04719.21
5.4.390.0070.04719.24
5.4.380.0030.05319.24
5.4.370.0030.06719.25
5.4.360.0100.07718.85
5.4.350.0100.07018.86
5.4.340.0030.06319.15
5.4.320.0070.07719.15
5.4.310.0070.05019.24
5.4.300.0000.05718.98
5.4.290.0070.04719.18
5.4.280.0100.04018.87
5.4.270.0070.04719.15
5.4.260.0070.08319.24
5.4.250.0030.07718.87
5.4.240.0100.07319.07
5.4.230.0030.07319.14
5.4.220.0200.05319.14
5.4.210.0130.07318.91
5.4.200.0000.07719.19
5.4.190.0100.07319.14
5.4.180.0130.03019.15
5.4.170.0130.06318.98
5.4.160.0030.08319.22
5.4.150.0070.06319.15
5.4.140.0070.06716.27
5.4.130.0000.04716.26
5.4.120.0100.07316.41
5.4.110.0030.05016.48
5.4.100.0070.04016.39
5.4.90.0100.06716.43
5.4.80.0030.05316.28
5.4.70.0200.06316.36
5.4.60.0030.05016.47
5.4.50.0100.06316.50
5.4.40.0030.05316.38
5.4.30.0000.06716.36
5.4.20.0030.07716.36
5.4.10.0030.05016.42
5.4.00.0230.05715.86
5.3.290.0070.07014.71
5.3.280.0100.06314.61
5.3.270.0100.07314.49
5.3.260.0070.06014.64
5.3.250.0070.07314.61
5.3.240.0100.05714.50
5.3.230.0030.08014.49
5.3.220.0100.03314.48
5.3.210.0070.07314.63
5.3.200.0130.05314.54
5.3.190.0070.06714.58
5.3.180.0100.07314.60
5.3.170.0070.05714.71
5.3.160.0030.04014.56
5.3.150.0070.07714.62
5.3.140.0030.05714.57
5.3.130.0070.07314.58
5.3.120.0200.06014.56
5.3.110.0030.08314.56
5.3.100.0030.07714.20
5.3.90.0070.07014.05
5.3.80.0030.07314.07
5.3.70.0030.07713.93
5.3.60.0070.07314.00
5.3.50.0100.06714.00
5.3.40.0000.08013.95
5.3.30.0100.05013.85
5.3.20.0100.03713.58
5.3.10.0030.04313.70
5.3.00.0070.07013.63
5.2.170.0100.05311.14
5.2.160.0030.05011.14
5.2.150.0100.03711.14
5.2.140.0030.05311.06
5.2.130.0100.05011.06
5.2.120.0100.05711.05
5.2.110.0030.05711.05
5.2.100.0030.04011.06
5.2.90.0130.05011.05
5.2.80.0100.04011.13
5.2.70.0000.04311.04
5.2.60.0000.03310.93
5.2.50.0030.05711.08
5.2.40.0030.03711.00
5.2.30.0070.05011.04
5.2.20.0070.02710.95
5.2.10.0030.05010.86
5.2.00.0030.06010.61
5.1.60.0070.05010.04
5.1.50.0030.0509.89
5.1.40.0070.0439.88
5.1.30.0130.02710.43
5.1.20.0000.03710.36
5.1.10.0070.05310.09
5.1.00.0070.03310.04
5.0.50.0030.0208.45
5.0.40.0000.0278.38
5.0.30.0030.0678.37
5.0.20.0030.0438.11
5.0.10.0030.0408.14
5.0.00.0030.0478.06
4.4.90.0070.0337.78
4.4.80.0000.0237.78
4.4.70.0030.0377.78
4.4.60.0000.0307.78
4.4.50.0000.0407.78
4.4.40.0000.0407.78
4.4.30.0030.0207.78
4.4.20.0000.0307.78
4.4.10.0000.0207.78
4.4.00.0000.0307.78
4.3.110.0100.0107.78
4.3.100.0030.0337.78
4.3.90.0000.0337.78
4.3.80.0000.0337.78
4.3.70.0000.0337.78
4.3.60.0030.0137.78
4.3.50.0030.0137.78
4.3.40.0000.0537.78
4.3.30.0030.0177.78
4.3.20.0000.0237.78
4.3.10.0030.0377.78
4.3.00.0000.0177.78

preferences:
41.69 ms | 401 KiB | 5 Q