3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen_one_to_three() { for ($i = 1; $i <= 3; $i++) { $a = yield; echo $a; } } $generator = gen_one_to_three(); foreach ($generator as $value) { $generator->send('cheese'); var_dump($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.0090.00916.63
8.3.50.0080.01017.44
8.3.40.0110.00418.81
8.3.30.0110.00418.71
8.3.20.0080.00018.70
8.3.10.0030.00620.54
8.3.00.0080.00019.01
8.2.180.0030.01516.50
8.2.170.0070.00722.96
8.2.160.0080.00621.02
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0120.00619.07
8.2.110.0000.00920.95
8.2.100.0110.00017.84
8.2.90.0030.00619.20
8.2.80.0000.00819.21
8.2.70.0000.00817.37
8.2.60.0000.00817.88
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0040.00418.13
8.2.20.0000.00717.66
8.2.10.0030.00617.82
8.2.00.0040.00417.61
8.1.280.0090.00925.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00322.47
8.1.230.0090.00320.97
8.1.220.0040.00417.78
8.1.210.0060.00319.04
8.1.200.0060.00317.35
8.1.190.0040.00417.66
8.1.180.0060.00318.10
8.1.170.0040.00418.84
8.1.160.0000.00718.93
8.1.150.0070.00018.59
8.1.140.0050.00317.32
8.1.130.0080.00017.82
8.1.120.0040.00417.39
8.1.110.0030.00517.37
8.1.100.0070.00017.39
8.1.90.0050.00317.49
8.1.80.0000.00717.37
8.1.70.0000.00717.33
8.1.60.0000.00817.44
8.1.50.0040.00417.42
8.1.40.0000.00717.40
8.1.30.0050.00217.48
8.1.20.0020.00517.49
8.1.10.0040.00417.55
8.1.00.0050.00317.41
8.0.300.0060.00320.04
8.0.290.0070.00016.75
8.0.280.0040.00418.36
8.0.270.0000.00717.17
8.0.260.0030.00316.72
8.0.250.0110.00016.89
8.0.240.0080.00016.95
8.0.230.0070.00016.94
8.0.220.0070.00016.95
8.0.210.0070.00016.85
8.0.200.0040.00416.95
8.0.190.0030.00316.84
8.0.180.0000.00716.75
8.0.170.0000.00716.88
8.0.160.0030.00316.86
8.0.150.0030.00616.85
8.0.140.0000.00816.86
8.0.130.0050.00013.33
8.0.120.0050.00316.84
8.0.110.0040.00416.94
8.0.100.0040.00316.77
8.0.90.0070.00016.92
8.0.80.0110.00316.93
8.0.70.0000.00816.86
8.0.60.0000.00716.70
8.0.50.0040.00416.86
8.0.30.0090.01317.08
8.0.20.0090.01017.18
8.0.10.0030.00517.04
8.0.00.0080.01116.77
7.4.330.0020.00213.10
7.4.320.0030.00316.57
7.4.300.0030.00316.47
7.4.290.0070.00016.51
7.4.280.0000.00716.50
7.4.270.0070.00016.59
7.4.260.0030.00313.21
7.4.250.0000.00816.63
7.4.240.0030.00516.42
7.4.230.0070.00016.65
7.4.220.0090.00616.46
7.4.210.0070.01016.60
7.4.200.0000.00716.52
7.4.190.0000.00716.75
7.4.160.0060.01016.53
7.4.150.0180.00016.33
7.4.140.0070.01116.60
7.4.130.0050.01516.54
7.4.120.0050.01316.38
7.4.110.0090.00916.43
7.4.100.0130.01016.43
7.4.90.0080.00816.33
7.4.80.0100.00619.39
7.4.70.0090.01216.53
7.4.60.0150.00516.54
7.4.50.0070.00016.66
7.4.40.0100.00516.49
7.4.30.0110.01116.43
7.4.00.0100.00715.01
7.3.330.0030.00313.23
7.3.320.0000.00613.37
7.3.310.0050.00216.19
7.3.300.0030.00316.29
7.3.290.0100.00316.23
7.3.280.0050.01216.31
7.3.270.0070.01016.41
7.3.260.0030.02016.60
7.3.250.0110.00716.44
7.3.240.0030.01316.38
7.3.230.0040.01216.73
7.3.210.0030.01316.41
7.3.200.0090.00916.29
7.3.190.0160.00316.64
7.3.180.0110.00616.36
7.3.170.0060.00916.36
7.3.160.0060.01016.32
7.3.120.0030.01314.86
7.2.330.0080.01216.69
7.2.320.0100.00716.77
7.2.310.0060.01616.73
7.2.300.0100.00716.90
7.2.290.0130.00316.43
7.2.00.0090.00619.33
7.1.100.0050.00518.22
7.1.70.0060.00917.34
7.1.60.0030.02119.40
7.1.50.0000.02117.11
7.1.00.0000.07322.57
7.0.200.0040.00416.77
7.0.140.0030.07321.93
7.0.120.0030.04322.00
7.0.60.0000.04719.89
7.0.50.0070.08717.88
7.0.40.0130.08017.73
7.0.30.0030.04717.88
7.0.20.0070.08017.80
7.0.10.0130.04017.71
7.0.00.0070.05317.71
5.6.280.0030.07321.07
5.6.210.0000.05720.73
5.6.200.0130.07318.15
5.6.190.0130.07318.16
5.6.180.0000.06718.18
5.6.170.0100.08018.19
5.6.160.0030.08318.18
5.6.150.0070.04718.19
5.6.140.0070.06718.18
5.6.130.0030.05718.14
5.6.120.0100.04318.28
5.6.110.0100.05718.17
5.6.100.0100.08018.18
5.6.90.0170.07018.13
5.6.80.0100.06017.60
5.6.70.0100.05017.65
5.6.60.0070.03717.57
5.6.50.0000.04717.54
5.6.40.0070.07317.63
5.6.30.0030.07717.60
5.6.20.0070.07017.50
5.6.10.0030.07717.56
5.6.00.0100.07317.52
5.5.350.0300.05020.39
5.5.340.0100.08017.99
5.5.330.0100.07718.04
5.5.320.0070.07718.09
5.5.310.0030.04317.99
5.5.300.0100.04717.98
5.5.290.0170.06317.97
5.5.280.0100.04017.95
5.5.270.0130.03717.93
5.5.260.0130.06318.07
5.5.250.0070.06717.80
5.5.240.0030.06317.37
5.5.230.0030.08317.33
5.5.220.0030.06717.32
5.5.210.0200.06017.32
5.5.200.0030.07317.28
5.5.190.0130.03017.37
5.5.180.0100.06717.37
5.5.160.0100.06317.38
5.5.150.0130.04317.33
5.5.140.0030.06017.45
5.5.130.0000.04317.30
5.5.120.0000.04717.38
5.5.110.0170.05317.32
5.5.100.0070.07317.18
5.5.90.0100.03317.20
5.5.80.0000.04717.26
5.5.70.0130.05317.20
5.5.60.0070.04317.22
5.5.50.0070.04017.16
5.5.40.0070.06317.20
5.5.30.0070.07717.21
5.5.20.0100.05017.22
5.5.10.0000.05017.32
5.5.00.0030.04017.26
5.4.450.0070.04019.43
5.4.440.0030.08019.37
5.4.430.0070.07719.27
5.4.420.0170.06719.30
5.4.410.0170.06719.32
5.4.400.0000.04719.14
5.4.390.0130.07319.03
5.4.380.0130.07019.09
5.4.370.0170.06719.01
5.4.360.0130.06319.03
5.4.350.0130.06719.12
5.4.340.0030.08018.89
5.4.320.0070.08018.88
5.4.310.0100.07019.01
5.4.300.0070.06019.00
5.4.290.0030.04318.94
5.4.280.0030.04319.05
5.4.270.0100.07319.05
5.4.260.0130.07019.12
5.4.250.0130.03719.04
5.4.240.0030.07019.12
5.4.230.0070.06318.89
5.4.220.0130.07018.87
5.4.210.0070.06319.25
5.4.200.0030.06319.09
5.4.190.0100.07319.05
5.4.180.0070.05018.96
5.4.170.0070.04019.05
5.4.160.0100.05718.99
5.4.150.0030.07719.01
5.4.140.0070.03316.23
5.4.130.0070.07316.55
5.4.120.0000.06316.34
5.4.110.0200.05316.38
5.4.100.0070.03716.40
5.4.90.0000.04016.40
5.4.80.0070.05316.41
5.4.70.0100.07316.54
5.4.60.0100.06016.32
5.4.50.0000.07716.29
5.4.40.0200.05316.46
5.4.30.0030.08016.40
5.4.20.0100.04016.37
5.4.10.0030.04316.43
5.4.00.0170.06015.74
5.3.290.0030.04314.62
5.3.280.0070.08314.61
5.3.270.0070.05314.63
5.3.260.0130.02714.82
5.3.250.0000.04014.70
5.3.240.0100.07014.56
5.3.230.0070.08014.81
5.3.220.0070.07714.67
5.3.210.0100.06314.62
5.3.200.0070.06014.52
5.3.190.0130.06314.67
5.3.180.0100.04314.58
5.3.170.0070.06314.61
5.3.160.0100.07014.64
5.3.150.0000.08314.63
5.3.140.0030.07714.63
5.3.130.0070.05014.59
5.3.120.0030.05314.40
5.3.110.0030.07714.57
5.3.100.0170.04313.88
5.3.90.0030.03713.97
5.3.80.0000.04014.02
5.3.70.0070.03314.09
5.3.60.0070.03713.88
5.3.50.0000.03713.97
5.3.40.0070.03714.04
5.3.30.0030.03313.96
5.3.20.0070.03013.59
5.3.10.0100.03013.85
5.3.00.0000.04013.46
5.2.170.0070.02311.18
5.2.160.0000.03311.36
5.2.150.0000.03011.19
5.2.140.0030.02711.21
5.2.130.0000.03011.17
5.2.120.0000.03011.17
5.2.110.0030.04011.00
5.2.100.0070.02711.17
5.2.90.0030.02710.94
5.2.80.0000.03011.07
5.2.70.0030.02710.93
5.2.60.0070.02311.09
5.2.50.0000.03010.98
5.2.40.0030.02711.20
5.2.30.0000.03010.95
5.2.20.0030.02711.01
5.2.10.0000.03010.84
5.2.00.0070.02310.78
5.1.60.0030.02010.03
5.1.50.0070.0209.97
5.1.40.0000.0279.80
5.1.30.0000.03010.31
5.1.20.0000.02710.39
5.1.10.0030.02310.14
5.1.00.0030.02310.07
5.0.50.0000.0208.53
5.0.40.0000.0208.61
5.0.30.0000.0338.29
5.0.20.0000.0208.28
5.0.10.0000.0208.00
5.0.00.0000.0308.14
4.4.90.0030.0177.59
4.4.80.0030.0107.59
4.4.70.0030.0137.59
4.4.60.0030.0137.59
4.4.50.0030.0137.59
4.4.40.0000.0237.59
4.4.30.0000.0177.59
4.4.20.0070.0107.59
4.4.10.0000.0177.59
4.4.00.0000.0237.59
4.3.110.0000.0137.59
4.3.100.0000.0177.59
4.3.90.0030.0137.59
4.3.80.0000.0237.59
4.3.70.0000.0137.59
4.3.60.0000.0177.59
4.3.50.0000.0177.59
4.3.40.0030.0277.59
4.3.30.0000.0337.59
4.3.20.0030.0337.59
4.3.10.0000.0377.59
4.3.00.0000.0377.59

preferences:
36.18 ms | 401 KiB | 5 Q