3v4l.org

run code in 300+ PHP versions simultaneously
<?php function yieldMe() : iterable { yield 1; yield 2; yield 3; } function someFunction(bool $toArray=true) : iterable { $found = yieldMe(); if($toArray){ return yield from iterator_to_array($found); } yield from $found; } $result = someFunction(); foreach($result as $r){ echo $r."\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.0150.00318.27
8.3.50.0100.01016.65
8.3.40.0120.00318.59
8.3.30.0060.00918.64
8.3.20.0070.00024.18
8.3.10.0070.00024.66
8.3.00.0050.00326.16
8.2.180.0100.00725.92
8.2.170.0100.01018.76
8.2.160.0060.00922.96
8.2.150.0080.00025.66
8.2.140.0100.00324.66
8.2.130.0050.00326.16
8.2.120.0030.00526.35
8.2.110.0120.00019.38
8.2.100.0110.00017.68
8.2.90.0030.00617.38
8.2.80.0000.00818.79
8.2.70.0030.00718.05
8.2.60.0040.00418.03
8.2.50.0030.00718.10
8.2.40.0000.00821.07
8.2.30.0060.00319.17
8.2.20.0000.00717.95
8.2.10.0040.00421.02
8.2.00.0040.00419.30
8.1.280.0110.00325.92
8.1.270.0040.00424.66
8.1.260.0050.00228.09
8.1.250.0080.00028.09
8.1.240.0060.00321.05
8.1.230.0070.00417.76
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0050.00517.35
8.1.190.0040.00417.48
8.1.180.0080.00018.10
8.1.170.0080.00018.38
8.1.160.0000.00820.59
8.1.150.0040.00418.81
8.1.140.0080.00018.91
8.1.130.0070.00020.08
8.1.120.0040.00417.46
8.1.110.0050.00317.41
8.1.100.0030.00517.45
8.1.90.0040.00417.48
8.1.80.0040.00417.50
8.1.70.0000.00917.47
8.1.60.0030.00717.64
8.1.50.0030.00617.42
8.1.40.0000.00817.41
8.1.30.0040.00417.55
8.1.20.0040.00417.67
8.1.10.0030.00517.49
8.1.00.0030.00617.40
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0000.00818.40
8.0.270.0030.00316.86
8.0.260.0040.00418.30
8.0.250.0050.00216.96
8.0.240.0070.00016.93
8.0.230.0030.00317.00
8.0.220.0080.00016.81
8.0.210.0000.00816.83
8.0.200.0030.00316.97
8.0.190.0080.00016.85
8.0.180.0040.00416.92
8.0.170.0090.00016.83
8.0.160.0040.00416.89
8.0.150.0000.00716.87
8.0.140.0000.00716.89
8.0.130.0030.00313.32
8.0.120.0000.00716.81
8.0.110.0040.00416.99
8.0.100.0050.00216.76
8.0.90.0000.00716.78
8.0.80.0030.01316.83
8.0.70.0050.00216.73
8.0.60.0000.00716.78
8.0.50.0000.00716.87
8.0.30.0120.00916.95
8.0.20.0100.00817.01
8.0.10.0110.00816.96
8.0.00.0090.01017.07
7.4.330.0020.00215.55
7.4.320.0000.00616.48
7.4.300.0040.00416.61
7.4.290.0080.00016.59
7.4.280.0000.00716.60
7.4.270.0000.00716.46
7.4.260.0000.00513.27
7.4.250.0000.00716.48
7.4.240.0030.00616.54
7.4.230.0070.00016.34
7.4.220.0020.00516.65
7.4.210.0060.01116.60
7.4.200.0000.00716.39
7.4.160.0130.01016.66
7.4.150.0070.01216.66
7.4.140.0060.01316.44
7.4.130.0140.00616.47
7.4.120.0110.00816.51
7.4.110.0120.00516.51
7.4.100.0030.01316.44
7.4.90.0030.01516.48
7.4.80.0060.01116.41
7.4.70.0060.01516.59
7.4.60.0100.01016.49
7.4.50.0050.01116.51
7.4.40.0070.00916.41
7.4.30.0050.01116.38
7.4.20.0050.01316.39
7.4.10.0100.00816.52
7.4.00.0150.00516.56
7.3.330.0050.00316.13
7.3.320.0000.00613.25
7.3.310.0050.00216.34
7.3.300.0040.00416.31
7.3.290.0070.00716.29
7.3.270.0090.00916.30
7.3.260.0050.01316.28
7.3.250.0020.01616.25
7.3.240.0060.00916.23
7.3.230.0110.00616.28
7.3.220.0140.00116.30
7.3.210.0060.01016.31
7.3.200.0110.00616.27
7.3.190.0100.00516.23
7.3.180.0070.01016.31
7.3.170.0090.00816.26
7.3.160.0120.00716.26
7.3.150.0050.01016.34
7.3.140.0040.01616.38
7.3.130.0080.00816.26
7.3.120.0060.00916.23
7.3.110.0050.01516.17
7.3.100.0080.01216.16
7.3.90.0070.01116.51
7.3.80.0080.00916.21
7.3.70.0040.01016.45
7.3.60.0100.00716.42
7.3.50.0130.00816.46
7.3.40.0160.00516.43
7.3.30.0130.00616.48
7.3.20.0080.01018.29
7.3.10.0070.01518.21
7.3.00.0090.00618.20

preferences:
65.79 ms | 400 KiB | 5 Q