3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { yield 1; yield 3 => 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 \n"; } 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.70.0150.00316.75
8.3.60.0130.00316.50
8.3.50.0120.00517.27
8.3.40.0090.00618.66
8.3.30.0070.00718.71
8.3.20.0040.00420.13
8.3.10.0080.00023.64
8.3.00.0030.00517.59
8.2.180.0140.00418.16
8.2.170.0120.00322.96
8.2.160.0040.01620.18
8.2.150.0040.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00321.00
8.2.120.0080.00026.35
8.2.110.0030.00620.44
8.2.100.0000.01217.78
8.2.90.0040.00418.99
8.2.80.0040.00417.97
8.2.70.0090.00017.50
8.2.60.0050.00318.03
8.2.50.0080.00018.10
8.2.40.0000.00720.65
8.2.30.0030.00621.02
8.2.20.0040.00417.96
8.2.10.0000.00717.95
8.2.00.0040.00418.16
8.1.280.0100.00725.92
8.1.270.0040.00422.14
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0080.00022.18
8.1.230.0110.00017.76
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0020.00517.48
8.1.180.0040.00418.10
8.1.170.0080.00018.64
8.1.160.0000.00818.98
8.1.150.0030.00518.88
8.1.140.0000.00719.50
8.1.130.0070.00018.93
8.1.120.0000.00817.49
8.1.110.0040.00817.50
8.1.100.0030.00617.47
8.1.90.0040.00417.52
8.1.80.0000.00817.45
8.1.70.0050.00217.51
8.1.60.0000.00817.63
8.1.50.0040.00417.57
8.1.40.0090.00017.52
8.1.30.0000.00817.66
8.1.20.0040.00417.54
8.1.10.0040.00417.61
8.1.00.0000.00817.51
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0030.00318.36
8.0.270.0060.00317.27
8.0.260.0000.00816.78
8.0.250.0000.00716.93
8.0.240.0000.00816.84
8.0.230.0060.00316.90
8.0.220.0030.00316.85
8.0.210.0030.00316.80
8.0.200.0000.00716.91
8.0.190.0000.00816.95
8.0.180.0080.00016.90
8.0.170.0040.00416.91
8.0.160.0030.00316.99
8.0.150.0040.00416.76
8.0.140.0040.00416.85
8.0.130.0030.00313.32
8.0.120.0000.00816.86
8.0.110.0000.00716.93
8.0.100.0000.00716.77
8.0.90.0040.00416.93
8.0.80.0090.00616.84
8.0.70.0040.00416.67
8.0.60.0070.00016.77
8.0.50.0040.00416.95
8.0.30.0120.00617.06
8.0.20.0090.01017.40
8.0.10.0050.00216.98
8.0.00.0090.01716.76
7.4.330.0020.00215.55
7.4.320.0060.00016.52
7.4.300.0030.00316.57
7.4.290.0080.00016.54
7.4.280.0040.00416.64
7.4.270.0030.00316.55
7.4.260.0000.00716.42
7.4.250.0030.00616.46
7.4.240.0040.00416.60
7.4.230.0000.00716.56
7.4.220.0100.01716.68
7.4.210.0070.00716.60
7.4.200.0040.00416.50
7.4.160.0090.00916.51
7.4.150.0120.00617.40
7.4.140.0100.00817.86
7.4.130.0090.00916.43
7.4.120.0100.01116.46
7.4.110.0060.01516.27
7.4.100.0110.00716.57
7.4.90.0080.00816.32
7.4.80.0130.00319.39
7.4.70.0030.01416.53
7.4.60.0060.01016.48
7.4.50.0030.01016.26
7.4.40.0130.00316.46
7.4.30.0150.00916.33
7.4.00.0060.01214.68
7.3.330.0060.00013.23
7.3.320.0030.00313.38
7.3.310.0000.00716.43
7.3.300.0070.00016.25
7.3.290.0010.01316.38
7.3.280.0090.00916.33
7.3.270.0060.01217.40
7.3.260.0090.00916.58
7.3.250.0140.00716.41
7.3.240.0100.00816.38
7.3.230.0090.01016.38
7.3.210.0080.00816.64
7.3.200.0130.00316.25
7.3.190.0070.01116.37
7.3.180.0060.01016.57
7.3.170.0170.00616.56
7.3.160.0090.01616.28
7.2.330.0120.00616.77
7.2.320.0100.01116.77
7.2.310.0080.00916.69
7.2.300.0060.01116.63
7.2.290.0150.00616.77
7.2.80.0040.00716.36
7.2.60.0030.01316.93
7.2.00.0000.01319.61
7.1.200.0100.00315.86
7.1.100.0070.00718.26
7.1.70.0030.01217.09
7.1.60.0160.02034.96
7.1.50.0140.01834.69
7.1.40.0140.02234.54
7.1.30.0120.02234.60
7.1.20.0130.02034.60
7.1.10.0060.01216.46
7.1.00.0020.01516.63
7.0.200.0090.00316.79
7.0.190.0030.01116.61
7.0.180.0100.00716.23
7.0.170.0000.01616.45
7.0.160.0070.01116.22
7.0.150.0060.01116.25
7.0.140.0130.00716.18
7.0.130.0030.01416.60
7.0.120.0050.01616.51
7.0.110.0100.00916.32
7.0.100.0100.00816.30
7.0.90.0110.00816.31
7.0.80.0040.00916.49
7.0.70.0140.00216.27
7.0.60.0080.00816.23
7.0.50.0090.00916.18
7.0.40.0060.00916.51
7.0.30.0030.01116.18
7.0.20.0070.01016.21
7.0.10.0000.01616.31
7.0.00.0020.01516.36

preferences:
55.67 ms | 401 KiB | 5 Q