3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { yield 1; yield 2; yield from [3, 4]; yield from new ArrayIterator([5, 6]); yield from seven_eight(); return yield from nine_ten(); } function seven_eight() { yield 7; yield from eight(); } function eight() { yield 8; } function nine_ten() { yield 9; return 10; } $gen = count_to_ten(); foreach ($gen as $k => $num) { echo "$k -> $num "; } echo $gen->getReturn();

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.0150.00316.50
8.3.50.0130.00316.54
8.3.40.0040.01118.63
8.3.30.0040.01118.62
8.3.20.0040.00420.18
8.3.10.0030.00523.61
8.3.00.0080.00017.74
8.2.180.0070.00718.54
8.2.170.0100.00722.96
8.2.160.0090.00620.38
8.2.150.0100.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00321.04
8.2.120.0030.00626.35
8.2.110.0030.00619.30
8.2.100.0080.00319.38
8.2.90.0000.00819.22
8.2.80.0040.00418.04
8.2.70.0090.00417.25
8.2.60.0080.00017.80
8.2.50.0000.00818.10
8.2.40.0050.00220.48
8.2.30.0050.00219.13
8.2.20.0060.00318.04
8.2.10.0000.00817.93
8.2.00.0000.00717.93
8.1.280.0060.00825.92
8.1.270.0040.00422.24
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00319.15
8.1.230.0040.00819.48
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0040.00717.22
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0000.00818.46
8.1.160.0070.00018.92
8.1.150.0040.00418.89
8.1.140.0060.00319.58
8.1.130.0000.00718.80
8.1.120.0040.00417.32
8.1.110.0060.00317.45
8.1.100.0060.00317.41
8.1.90.0030.00517.46
8.1.80.0000.00817.29
8.1.70.0060.00317.38
8.1.60.0060.00317.58
8.1.50.0040.00417.55
8.1.40.0030.00617.53
8.1.30.0040.00417.72
8.1.20.0040.00417.60
8.1.10.0040.00417.59
8.1.00.0000.00717.52
8.0.300.0030.00618.77
8.0.290.0040.00416.61
8.0.280.0000.00718.35
8.0.270.0030.00617.31
8.0.260.0030.00316.69
8.0.250.0050.00216.87
8.0.240.0040.00416.98
8.0.230.0030.00616.97
8.0.220.0030.00316.92
8.0.210.0040.00416.88
8.0.200.0040.00416.95
8.0.190.0090.00016.91
8.0.180.0000.00716.95
8.0.170.0000.00716.95
8.0.160.0030.00316.79
8.0.150.0000.00716.89
8.0.140.0080.00016.88
8.0.130.0000.00613.28
8.0.120.0050.00216.87
8.0.110.0000.00716.95
8.0.100.0050.00216.76
8.0.90.0070.00016.91
8.0.80.0060.00916.91
8.0.70.0000.00716.89
8.0.60.0040.00416.71
8.0.50.0040.00416.89
8.0.30.0050.01316.89
8.0.20.0110.00917.40
8.0.10.0070.00017.02
8.0.00.0090.01216.57
7.4.330.0020.00215.55
7.4.320.0050.00216.59
7.4.300.0040.00416.61
7.4.290.0000.01016.62
7.4.280.0000.00816.41
7.4.270.0050.00216.43
7.4.260.0040.00416.50
7.4.250.0040.00416.57
7.4.240.0030.00316.46
7.4.230.0030.00316.25
7.4.220.0100.01716.59
7.4.210.0060.00916.51
7.4.200.0000.00716.40
7.4.160.0120.00916.55
7.4.150.0130.00717.40
7.4.140.0100.00917.86
7.4.130.0060.01316.55
7.4.120.0090.01016.54
7.4.110.0100.00716.55
7.4.100.0180.00616.47
7.4.90.0100.00716.69
7.4.80.0070.01019.39
7.4.70.0100.00616.39
7.4.60.0090.00816.59
7.4.50.0030.01116.50
7.4.40.0100.00616.57
7.4.30.0140.00316.47
7.4.00.0060.01114.90
7.3.330.0050.00013.34
7.3.320.0050.00013.23
7.3.310.0000.00716.48
7.3.300.0000.00716.34
7.3.290.0000.00616.33
7.3.280.0070.01016.35
7.3.270.0100.00717.40
7.3.260.0110.00716.62
7.3.250.0150.00816.56
7.3.240.0100.00816.44
7.3.230.0180.00616.51
7.3.210.0110.00616.42
7.3.200.0120.00316.57
7.3.190.0130.00316.47
7.3.180.0130.00616.55
7.3.170.0060.00916.39
7.3.160.0030.01316.23
7.3.120.0130.00714.71
7.3.110.0090.00914.82
7.3.100.0100.00314.99
7.3.90.0070.01015.01
7.3.80.0000.01314.82
7.3.70.0030.00914.84
7.3.60.0030.01314.85
7.3.50.0100.00314.66
7.3.40.0060.00614.73
7.3.30.0140.00014.89
7.3.20.0070.00716.67
7.3.10.0060.00916.63
7.3.00.0080.00416.76
7.2.330.0060.01216.69
7.2.320.0100.00616.51
7.2.310.0100.00616.76
7.2.300.0130.00316.70
7.2.290.0070.01416.84
7.2.250.0090.00915.16
7.2.240.0070.01115.05
7.2.230.0060.00614.84
7.2.220.0040.01514.70
7.2.210.0000.01315.07
7.2.200.0030.01315.29
7.2.190.0030.01615.04
7.2.180.0000.01414.84
7.2.170.0040.01215.07
7.2.60.0060.01016.80
7.2.00.0060.00619.62
7.1.330.0120.00315.79
7.1.320.0070.01015.67
7.1.310.0040.00815.87
7.1.300.0130.00015.74
7.1.290.0030.00615.67
7.1.280.0040.00715.61
7.1.270.0100.00315.77
7.1.260.0060.00315.81
7.1.200.0030.00515.74
7.1.100.0090.00318.42
7.1.70.0070.01216.95
7.1.60.0200.01335.17
7.1.50.0240.01234.82
7.1.40.0230.01234.50
7.1.30.0250.01034.20
7.1.20.0220.01334.55
7.1.10.0110.00616.43
7.1.00.0070.01016.37
7.0.200.0030.01316.90
7.0.190.0050.00916.86
7.0.180.0100.00916.00
7.0.170.0000.01816.12
7.0.160.0110.00616.26
7.0.150.0030.01216.45
7.0.140.0120.00716.22
7.0.130.0030.01016.68
7.0.120.0030.01216.37
7.0.110.0060.01016.18
7.0.100.0030.01416.23
7.0.90.0100.00716.48
7.0.80.0110.00716.21
7.0.70.0030.01316.31
7.0.60.0110.00415.88
7.0.50.0060.00916.32
7.0.40.0070.00916.46
7.0.30.0110.00816.18
7.0.20.0000.01316.40
7.0.10.0100.00816.52
7.0.00.0070.01016.25

preferences:
54.67 ms | 401 KiB | 5 Q