3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { yield from [0, 1, 2, 3, 4]; } $gen = (function(){ $foo = gen(); $foo->rewind(); $foo->valid(); yield $foo->key() => $foo->current(); $foo->next(); $foo->valid(); yield $foo->key() => $foo->current(); yield from $foo; })(); foreach($gen as $k => $v){ echo $k . " => " . $v . "\n"; }

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.0040.01118.30
8.3.50.0080.00818.05
8.3.40.0120.00318.67
8.3.30.0110.00418.57
8.3.20.0040.00420.87
8.3.10.0000.00723.52
8.3.00.0070.00020.82
8.2.180.0100.01018.19
8.2.170.0110.00422.96
8.2.160.0100.00322.12
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00326.16
8.2.110.0000.00922.33
8.2.100.0070.00318.03
8.2.90.0000.00819.57
8.2.80.0040.00418.04
8.2.70.0040.00417.93
8.2.60.0080.00018.16
8.2.50.0090.00018.10
8.2.40.0080.00022.31
8.2.30.0070.00019.24
8.2.20.0040.00417.94
8.2.10.0040.00418.81
8.2.00.0040.00419.28
8.1.280.0070.01025.92
8.1.270.0050.00322.45
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00320.50
8.1.230.0070.00420.77
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.47
8.1.190.0050.00317.23
8.1.180.0030.00518.10
8.1.170.0000.00818.71
8.1.160.0040.00420.25
8.1.150.0040.00418.89
8.1.140.0000.00818.86
8.1.130.0030.00520.19
8.1.120.0070.00017.52
8.1.110.0000.01017.44
8.1.100.0080.00017.45
8.1.90.0000.00717.42
8.1.80.0000.00717.53
8.1.70.0000.00717.34
8.1.60.0030.00517.61
8.1.50.0070.00017.41
8.1.40.0060.00317.57
8.1.30.0050.00617.68
8.1.20.0040.00417.62
8.1.10.0000.01017.57
8.1.00.0040.00417.53
8.0.300.0080.00021.51
8.0.290.0080.00016.75
8.0.280.0000.00718.46
8.0.270.0000.00817.38
8.0.260.0000.00620.01
8.0.250.0000.00916.92
8.0.240.0050.00516.86
8.0.230.0040.00416.93
8.0.220.0040.00416.83
8.0.210.0000.00716.76
8.0.200.0070.00016.82
8.0.190.0070.00016.96
8.0.180.0050.00316.91
8.0.170.0000.00816.80
8.0.160.0080.00016.94
8.0.150.0000.00716.93
8.0.140.0040.00416.89
8.0.130.0000.00713.29
8.0.120.0040.00416.95
8.0.110.0040.00416.76
8.0.100.0040.00416.67
8.0.90.0040.00416.91
8.0.80.0130.00316.87
8.0.70.0000.00716.71
8.0.60.0050.00316.93
8.0.50.0040.00416.89
8.0.30.0060.01117.21
8.0.20.0040.01417.07
8.0.10.0040.00416.94
8.0.00.0150.00316.81
7.4.330.0060.00015.55
7.4.320.0070.00016.37
7.4.300.0060.00016.61
7.4.290.0050.00316.64
7.4.280.0040.00416.54
7.4.270.0080.00016.49
7.4.260.0030.00313.26
7.4.250.0030.00616.57
7.4.240.0000.00816.57
7.4.230.0040.00416.26
7.4.220.0040.00316.51
7.4.210.0100.00716.52
7.4.200.0030.00316.70
7.4.130.0090.00916.41
7.4.120.0070.01116.48
7.4.110.0170.00016.59
7.4.100.0080.00816.49
7.4.90.0030.01516.51
7.4.80.0070.01019.39
7.4.70.0180.00316.45
7.4.60.0170.00016.45
7.4.50.0080.00816.52
7.4.40.0100.01016.34
7.4.10.0100.00615.09
7.4.00.0020.01415.11
7.3.330.0100.00016.29
7.3.320.0000.00513.13
7.3.310.0000.00716.30
7.3.300.0000.00716.30
7.3.290.0070.00016.24
7.3.260.0100.01016.45
7.3.240.0050.01116.42
7.3.230.0170.00316.39
7.3.210.0060.01016.33
7.3.200.0030.01516.53
7.3.190.0130.00316.50
7.3.180.0060.00916.36
7.3.170.0030.01516.55
7.3.160.0100.00716.52
7.3.130.0150.00314.88
7.3.120.0110.00714.73
7.3.110.0070.01315.05
7.3.100.0080.00714.94
7.3.90.0060.00614.96
7.3.80.0070.00414.83
7.3.70.0050.01014.66
7.3.60.0050.01114.71
7.3.50.0110.00314.78
7.3.40.0140.00314.89
7.3.30.0060.00914.77
7.3.20.0090.00815.76
7.3.10.0090.00815.78
7.3.00.0110.00215.59
7.2.330.0040.01416.47
7.2.320.0070.01016.55
7.2.310.0100.01016.55
7.2.300.0000.01616.80
7.2.290.0170.00616.79
7.2.260.0080.01115.12
7.2.250.0080.00615.17
7.2.240.0110.00714.99
7.2.230.0090.00514.98
7.2.220.0070.01215.26
7.2.210.0060.01114.96
7.2.200.0060.01015.11
7.2.190.0090.00514.87
7.2.180.0040.01014.98
7.2.170.0070.01015.10
7.2.160.0060.00914.95
7.2.150.0060.01415.98
7.2.140.0120.01116.07
7.2.130.0070.00716.13
7.2.120.0070.00816.08
7.2.110.0060.01116.09
7.2.100.0080.00916.04
7.2.90.0040.01216.06
7.2.80.0070.01116.08
7.2.70.0060.01116.05
7.2.60.0110.00415.98
7.2.50.0110.00616.13
7.2.40.0080.00616.06
7.2.30.0070.01016.03
7.2.20.0090.00715.91
7.2.10.0050.01116.12
7.2.00.0110.00515.97
7.1.330.0070.00714.79
7.1.320.0090.00514.68
7.1.310.0100.00814.90
7.1.300.0070.00814.95
7.1.290.0120.00314.75
7.1.280.0060.01014.78
7.1.270.0050.00714.74
7.1.260.0050.00914.95
7.1.250.0050.01014.73
7.1.240.0030.01015.96
7.1.230.0060.01215.68
7.1.220.0060.01215.72
7.1.210.0060.00315.68
7.1.200.0070.00715.76
7.1.190.0070.00715.70
7.1.180.0000.01515.48
7.1.170.0000.01515.76
7.1.160.0030.01015.88
7.1.150.0030.00815.91
7.1.140.0040.01115.68
7.1.130.0070.00315.84
7.1.120.0030.01015.82
7.1.110.0000.01215.91
7.1.100.0030.00715.59
7.1.90.0000.01015.82
7.1.80.0070.00715.82
7.1.70.0040.01115.77
7.1.60.0100.00315.67
7.1.50.0000.00815.56
7.1.40.0060.00915.80
7.1.30.0070.00315.48
7.1.20.0070.00715.76
7.1.10.0070.00715.89
7.1.00.0070.00715.59

preferences:
74.15 ms | 401 KiB | 5 Q