3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen1() { $x = yield 1; yield 2; yield $x; } function gen2() { yield from gen1(); yield from gen1(); } function gen3() { yield from gen2(); } $g = gen3(); var_dump($g->current()); $g->send(100); foreach($g as $val) { var_dump($val); }

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.40.0040.01118.67
8.3.30.0110.00418.85
8.3.20.0000.00820.21
8.3.10.0030.00621.76
8.3.00.0050.00319.26
8.2.170.0120.00622.96
8.2.160.0100.00322.11
8.2.150.0070.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00017.50
8.2.110.0030.00620.47
8.2.100.0040.00818.04
8.2.90.0040.00419.21
8.2.80.0000.00817.97
8.2.70.0090.00017.59
8.2.60.0000.00817.93
8.2.50.0090.00018.07
8.2.40.0060.00319.38
8.2.30.0040.00420.72
8.2.20.0050.00317.63
8.2.10.0050.00218.08
8.2.00.0000.00818.05
8.1.270.0050.00323.95
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0030.00722.66
8.1.230.0080.00417.66
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.38
8.1.180.0040.00418.10
8.1.170.0030.00818.50
8.1.160.0040.00422.09
8.1.150.0040.00418.90
8.1.140.0030.00619.55
8.1.130.0030.00317.63
8.1.120.0000.00717.52
8.1.110.0040.00417.43
8.1.100.0040.00417.35
8.1.90.0040.00417.50
8.1.80.0040.00417.54
8.1.70.0030.00317.38
8.1.60.0040.00417.61
8.1.50.0040.00417.43
8.1.40.0040.00417.50
8.1.30.0030.00517.66
8.1.20.0050.00317.71
8.1.10.0040.00417.54
8.1.00.0040.00417.41
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0030.00318.46
8.0.270.0000.00717.32
8.0.260.0000.00617.27
8.0.250.0070.00017.04
8.0.240.0050.00217.05
8.0.230.0000.00717.04
8.0.220.0000.00717.00
8.0.210.0000.00716.95
8.0.200.0000.00616.96
8.0.190.0080.00016.93
8.0.180.0040.00417.03
8.0.170.0000.00817.00
8.0.160.0000.00816.98
8.0.150.0000.00816.89
8.0.140.0000.00716.96
8.0.130.0030.00313.40
8.0.120.0080.00016.89
8.0.110.0070.00016.96
8.0.100.0040.00416.84
8.0.90.0000.00816.99
8.0.80.0060.01316.94
8.0.70.0000.00716.92
8.0.60.0040.00416.82
8.0.50.0030.00517.03
8.0.30.0030.01416.97
8.0.20.0070.01117.40
8.0.10.0000.00716.98
8.0.00.0100.00716.88
7.4.330.0020.00215.08
7.4.320.0030.00316.51
7.4.300.0030.00316.43
7.4.290.0030.00316.64
7.4.280.0080.00016.65
7.4.270.0030.00316.52
7.4.260.0030.00716.50
7.4.250.0050.00316.43
7.4.240.0050.00216.60
7.4.230.0000.00716.43
7.4.220.0030.01416.65
7.4.210.0060.01616.52
7.4.200.0000.00716.68
7.4.160.0060.00916.59
7.4.150.0080.01217.40
7.4.140.0100.01217.86
7.4.130.0080.01116.56
7.4.120.0050.01216.59
7.4.110.0090.00916.50
7.4.100.0150.00316.68
7.4.90.0160.00316.46
7.4.80.0150.00719.39
7.4.70.0100.00616.64
7.4.60.0120.00916.61
7.4.50.0000.00816.60
7.4.40.0090.01216.54
7.4.30.0160.00616.46
7.4.00.0030.01514.94
7.3.330.0050.00013.34
7.3.320.0000.00513.31
7.3.310.0030.00316.23
7.3.300.0040.00416.24
7.3.290.0100.00516.38
7.3.280.0100.00916.39
7.3.270.0150.00617.40
7.3.260.0130.00316.41
7.3.250.0100.00616.53
7.3.240.0100.01016.48
7.3.230.0100.01316.39
7.3.210.0070.01716.30
7.3.200.0000.01716.24
7.3.190.0060.00916.68
7.3.180.0040.01216.54
7.3.170.0100.00616.50
7.3.160.0130.01016.41
7.3.10.0090.00616.50
7.3.00.0100.00316.72
7.2.330.0110.00716.45
7.2.320.0160.00716.52
7.2.310.0060.01316.64
7.2.300.0120.01216.60
7.2.290.0170.00016.56
7.2.130.0070.00717.16
7.2.120.0030.01017.02
7.2.110.0120.00316.79
7.2.100.0090.00016.90
7.2.90.0060.00617.05
7.2.80.0060.00616.88
7.2.70.0030.01016.88
7.2.60.0060.00816.79
7.2.50.0060.00616.99
7.2.40.0070.00717.04
7.2.30.0100.00317.00
7.2.20.0070.00716.72
7.2.10.0030.01117.01
7.2.00.0060.00618.12
7.1.250.0030.00515.74
7.1.200.0030.01215.71
7.1.100.0060.01017.77
7.1.70.0030.00617.08
7.1.60.0070.01719.43
7.1.50.0100.00316.89
7.1.00.0070.07322.45
7.0.200.0040.00416.33
7.0.60.0070.06019.95
7.0.50.0100.04717.95
7.0.40.0130.07320.24
7.0.30.0030.04320.24
7.0.20.0230.05320.32
7.0.10.0100.07720.07
7.0.00.0100.06020.06
5.6.280.0000.04020.91
5.6.210.0130.04320.75
5.6.200.0070.07318.25
5.6.190.0030.05720.69
5.6.180.0470.03320.57
5.6.170.0330.06720.39
5.6.160.0070.08320.66
5.6.150.0030.03718.19
5.6.140.0030.05318.23
5.6.130.0030.04318.18
5.6.120.0070.08021.02
5.6.110.0130.07320.98
5.6.100.0070.06020.89
5.6.90.0070.07321.00
5.6.80.0130.07320.36
5.5.350.0300.07720.39
5.5.340.0130.03718.05
5.5.330.0030.05320.27
5.5.320.0130.04720.19
5.5.310.0200.04020.38
5.5.300.0000.04318.03
5.5.290.0070.07017.98
5.5.280.0100.04320.80
5.5.270.0100.08020.96
5.5.260.0030.04020.65
5.5.250.0000.04320.68
5.5.240.0070.05320.29
5.4.450.0570.05719.34
5.4.440.0530.06319.60
5.4.430.0500.06019.20
5.4.420.0600.05319.56
5.4.410.0570.05719.50
5.4.400.0530.04319.37
5.4.390.0530.05319.23
5.4.380.0630.04318.84
5.4.370.0500.05718.84
5.4.360.0500.06019.26
5.4.350.0400.06019.28
5.4.340.0470.05319.01
5.4.320.0400.06019.14
5.4.310.0430.05319.14
5.4.300.0530.05719.30
5.4.290.0600.04718.86
5.4.280.0670.05319.13
5.4.270.0600.05018.86
5.4.260.0470.06019.15
5.4.250.0570.05319.13
5.4.240.0530.06019.26
5.4.230.0470.05019.00
5.4.220.0530.04719.14
5.4.210.0530.05019.00
5.4.200.0500.04718.97
5.4.190.0430.05319.14
5.4.180.0430.05319.36
5.4.170.0470.04719.26
5.4.160.0400.05319.29
5.4.150.0370.06319.10
5.4.140.0570.05016.52
5.4.130.0330.05716.67
5.4.120.0570.04716.51
5.4.110.0700.05316.45
5.4.100.0670.05016.57
5.4.90.0600.05016.21
5.4.80.0500.05016.38
5.4.70.0470.04716.51
5.4.60.0470.04716.52
5.4.50.0430.04716.62
5.4.40.0470.04316.22
5.4.30.0400.05016.57
5.4.20.0500.05016.57
5.4.10.0500.05316.38
5.4.00.0530.06015.97

preferences:
57.16 ms | 400 KiB | 5 Q