3v4l.org

run code in 300+ PHP versions simultaneously
<?php function bar($x) { yield from $x; } /* Twice a Generator from bar() using yield from on $gen */ $it = [1, 2, 3, 4]; $gens[] = bar($it); $gens[] = bar($it); $i = 0; do { foreach ($gens as $g) { var_dump($g->current()); $g->next(); } $i++; } while($gens[0]->valid()); var_dump($gens[1]->valid());

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.0130.01016.75
8.3.50.0040.01118.29
8.3.40.0110.00418.73
8.3.30.0070.00718.70
8.3.20.0060.00320.29
8.3.10.0000.00723.71
8.3.00.0030.01619.38
8.2.180.0060.01216.63
8.2.170.0110.00422.96
8.2.160.0070.00721.07
8.2.150.0030.00524.18
8.2.140.0070.00024.66
8.2.130.0000.00917.75
8.2.120.0060.00326.35
8.2.110.0060.00320.39
8.2.100.0080.00317.76
8.2.90.0050.00318.28
8.2.80.0040.00418.16
8.2.70.0000.00917.93
8.2.60.0000.01117.93
8.2.50.0040.00418.10
8.2.40.0040.00420.47
8.2.30.0050.00320.64
8.2.20.0000.01117.67
8.2.10.0000.00818.26
8.2.00.0000.00718.12
8.1.280.0120.00325.92
8.1.270.0060.00323.81
8.1.260.0040.00428.09
8.1.250.0050.00228.09
8.1.240.0090.00023.92
8.1.230.0060.00817.61
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0060.00317.23
8.1.180.0040.00418.10
8.1.170.0060.00318.64
8.1.160.0070.00022.14
8.1.150.0040.00418.90
8.1.140.0000.00919.50
8.1.130.0070.00017.72
8.1.120.0070.00017.49
8.1.110.0070.00017.47
8.1.100.0040.00417.40
8.1.90.0040.00417.52
8.1.80.0030.00617.48
8.1.70.0000.00717.49
8.1.60.0040.00417.60
8.1.50.0040.00417.58
8.1.40.0000.00817.51
8.1.30.0040.00417.66
8.1.20.0000.00817.63
8.1.10.0030.00517.49
8.1.00.0030.00917.46
8.0.300.0000.00719.86
8.0.290.0040.00416.75
8.0.280.0040.00418.45
8.0.270.0070.00017.32
8.0.260.0000.00717.19
8.0.250.0080.00016.87
8.0.240.0080.00017.01
8.0.230.0070.00316.98
8.0.220.0030.00316.91
8.0.210.0040.00416.85
8.0.200.0040.00416.91
8.0.190.0000.00916.96
8.0.180.0040.00416.89
8.0.170.0030.00516.88
8.0.160.0080.00016.95
8.0.150.0000.00716.88
8.0.140.0040.00416.85
8.0.130.0000.00613.38
8.0.120.0040.00416.80
8.0.110.0000.00716.87
8.0.100.0080.00016.94
8.0.90.0030.00416.76
8.0.80.0030.01216.85
8.0.70.0000.00816.71
8.0.60.0070.00016.86
8.0.50.0050.00316.85
8.0.30.0140.00717.14
8.0.20.0150.00417.40
8.0.10.0000.00716.80
8.0.00.0070.01016.66
7.4.330.0000.00516.90
7.4.320.0060.00016.51
7.4.300.0000.00816.60
7.4.290.0000.00716.44
7.4.280.0080.00016.66
7.4.270.0030.00316.51
7.4.260.0030.00316.59
7.4.250.0040.00416.50
7.4.240.0020.00516.44
7.4.230.0070.00016.68
7.4.220.0070.01316.73
7.4.210.0040.01116.64
7.4.200.0070.00016.64
7.4.160.0060.00916.38
7.4.150.0140.00417.40
7.4.140.0110.00917.86
7.4.130.0060.01216.66
7.4.120.0100.00716.45
7.4.110.0150.00416.56
7.4.100.0100.01416.53
7.4.90.0190.00416.49
7.4.80.0110.00719.39
7.4.70.0080.00816.48
7.4.60.0040.01216.66
7.4.50.0030.01216.30
7.4.40.0030.01316.60
7.4.30.0070.01016.56
7.4.00.0060.00914.79
7.3.330.0030.00313.32
7.3.320.0050.00013.23
7.3.310.0030.00316.37
7.3.300.0060.00016.23
7.3.290.0050.00916.28
7.3.280.0080.00916.31
7.3.270.0140.00317.40
7.3.260.0060.01116.38
7.3.240.0100.00916.51
7.3.230.0110.00616.42
7.3.210.0090.00916.37
7.3.200.0110.00716.35
7.3.190.0030.01316.59
7.3.180.0070.01016.55
7.3.170.0090.01216.34
7.3.160.0030.01416.54
7.3.10.0040.00416.39
7.3.00.0060.01216.71
7.2.330.0070.01016.85
7.2.320.0090.00916.68
7.2.310.0100.00616.78
7.2.300.0070.01716.45
7.2.290.0030.01616.57
7.2.130.0120.00516.73
7.2.120.0070.01017.00
7.2.110.0070.00316.57
7.2.100.0100.00616.72
7.2.90.0070.01016.91
7.2.80.0050.00516.92
7.2.70.0070.00716.67
7.2.60.0120.00516.83
7.2.50.0090.00716.51
7.2.40.0080.01216.99
7.2.30.0180.00016.62
7.2.20.0120.00616.91
7.2.10.0110.00916.70
7.2.00.0060.00618.21
7.1.250.0110.00715.83
7.1.200.0080.00315.87
7.1.100.0000.01118.11
7.1.70.0030.00617.00
7.1.60.0070.01719.48
7.1.50.0140.00716.99
7.1.00.0070.07322.44
7.0.200.0330.00314.60
7.0.60.0000.08719.94
7.0.50.0130.07717.90
7.0.40.0130.08320.16
7.0.30.0370.06320.25
7.0.20.0400.05320.09
7.0.10.0070.04020.23
7.0.00.0130.07720.19
5.6.280.0030.03320.89
5.6.210.0070.08020.51
5.6.200.0070.08018.29
5.6.190.0070.04320.61
5.6.180.0270.06720.57
5.6.170.0200.07720.54
5.6.160.0000.04320.50
5.6.150.0030.05018.16
5.6.140.0070.08018.23
5.6.130.0070.05018.21
5.6.120.0070.07721.14
5.6.110.0100.08321.09
5.6.100.0030.07321.13
5.6.90.0070.08021.12
5.6.80.0070.07320.40
5.5.350.4030.03720.34
5.5.340.0070.06318.09
5.5.330.0030.05020.29
5.5.320.0000.04320.51
5.5.310.0200.04020.34
5.5.300.0000.04718.00
5.5.290.0100.07318.04
5.5.280.0130.07720.66
5.5.270.0130.08020.86
5.5.260.0070.08320.87
5.5.250.0100.08320.68
5.5.240.0200.05720.19

preferences:
53.26 ms | 400 KiB | 5 Q