3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function bar(string $stuff): Generator; } class Baz { public function bar(string $stuff): Generator { yield $stuff; } } $baz = new Baz; $g = $baz->bar("Hello PHP!"); foreach ($g as $value) { var_dump($value); }

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.5.30.0090.00819.27
8.5.20.0090.00719.40
8.5.10.0090.00818.36
8.5.00.0110.01019.82
8.4.180.0150.00819.71
8.4.170.0100.01123.81
8.4.160.0100.01223.89
8.4.150.0050.00716.88
8.4.140.0140.00717.49
8.4.130.0070.00518.93
8.4.120.0090.00923.99
8.4.110.0050.00518.60
8.4.100.0050.00517.67
8.4.90.0120.00820.70
8.4.80.0040.00418.82
8.4.70.0080.01218.68
8.4.60.0100.00919.07
8.4.50.0080.00718.68
8.4.40.0100.00717.58
8.4.30.0200.00017.70
8.4.20.0130.00619.57
8.4.10.0130.00619.43
8.3.300.0140.00620.79
8.3.290.0090.01120.88
8.3.280.0130.00718.29
8.3.270.0090.00916.54
8.3.260.0040.00416.80
8.3.250.0120.00718.53
8.3.240.0110.00717.15
8.3.230.0100.01016.73
8.3.220.0120.00719.16
8.3.210.0050.00220.53
8.3.200.0060.00316.59
8.3.190.0070.00817.30
8.3.180.0050.00318.85
8.3.170.0130.00622.66
8.3.160.0060.01318.78
8.3.150.0100.00717.07
8.3.140.0040.00419.11
8.3.130.0040.01118.32
8.3.120.0030.00618.86
8.3.110.0090.00020.94
8.3.100.0040.00724.06
8.3.90.0080.00026.77
8.3.80.0000.00917.97
8.3.70.0090.00618.31
8.3.60.0120.00318.30
8.3.50.0060.01118.27
8.3.40.0080.00818.62
8.3.30.0120.00318.54
8.3.20.0070.00018.83
8.3.10.0070.00021.60
8.3.00.0040.00423.53
8.2.300.0160.00724.00
8.2.290.0040.00420.28
8.2.280.0060.01318.17
8.2.270.0110.00716.71
8.2.260.0090.00917.00
8.2.250.0080.00016.73
8.2.240.0030.00618.91
8.2.230.0080.00022.58
8.2.220.0040.00437.54
8.2.210.0080.00026.77
8.2.200.0070.00316.50
8.2.190.0090.00916.58
8.2.180.0090.00618.18
8.2.170.0130.00722.96
8.2.160.0100.00319.41
8.2.150.0040.00424.18
8.2.140.0000.01424.66
8.2.130.0040.00422.08
8.2.120.0070.00026.35
8.2.110.0060.00320.92
8.2.100.0060.00617.91
8.2.90.0070.00317.91
8.2.80.0000.00817.97
8.2.70.0060.00317.80
8.2.60.0040.00418.03
8.2.50.0030.00618.10
8.2.40.0030.00619.30
8.2.30.0030.00619.27
8.2.20.0000.00718.18
8.2.10.0040.00418.16
8.2.00.0050.00319.43
8.1.340.0110.00921.70
8.1.330.0100.00921.94
8.1.320.0100.00917.89
8.1.310.0000.00716.85
8.1.300.0120.00319.81
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0030.01022.06
8.1.260.0040.00426.35
8.1.250.0030.00528.09
8.1.240.0080.00022.13
8.1.230.0070.00322.71
8.1.220.0050.00317.74
8.1.210.0030.00518.91
8.1.200.0090.00017.25
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0030.00518.91
8.1.160.0040.00418.91
8.1.150.0040.00418.89
8.1.140.0040.00417.58
8.1.130.0000.01018.95
8.1.120.0050.00317.32
8.1.110.0040.00417.45
8.1.100.0000.00717.43
8.1.90.0000.00717.30
8.1.80.0040.00417.43
8.1.70.0070.00317.43
8.1.60.0040.00417.46
8.1.50.0060.00317.50
8.1.40.0000.00917.55
8.1.30.0080.00017.66
8.1.20.0080.00017.55
8.1.10.0090.00017.47
8.1.00.0050.00317.39
8.0.300.0040.00419.66
8.0.290.0080.00016.75
8.0.280.0050.00318.35
8.0.270.0000.00717.28
8.0.260.0000.00617.12
8.0.250.0000.00616.92
8.0.240.0000.00716.90
8.0.230.0000.00716.86
8.0.220.0070.00016.92
8.0.210.0070.00316.88
8.0.200.0060.00017.00
8.0.190.0040.00416.95
8.0.180.0000.00816.87
8.0.170.0030.00516.79
8.0.160.0040.00416.87
8.0.150.0040.00416.66
8.0.140.0070.00016.74
8.0.130.0060.00013.35
8.0.120.0070.00016.75
8.0.110.0070.00016.71
8.0.100.0000.00816.88
8.0.90.0000.00716.83
8.0.80.0070.00916.87
8.0.70.0000.00716.94
8.0.60.0070.00016.77
8.0.50.0070.00016.70
8.0.30.0060.01217.04
8.0.20.0060.01217.40
8.0.10.0070.00016.95
8.0.00.0110.00616.73
7.4.330.0000.00415.55
7.4.320.0030.00316.50
7.4.300.0030.00316.60
7.4.290.0000.00716.57
7.4.280.0060.00316.53
7.4.270.0030.00316.58
7.4.260.0070.00016.40
7.4.250.0030.00316.57
7.4.240.0070.00016.60
7.4.230.0040.00416.43
7.4.220.0080.00016.60
7.4.210.0020.01416.48
7.4.200.0070.00016.66
7.4.160.0100.00816.43
7.4.140.0100.00917.86
7.4.130.0140.00316.55
7.4.120.0080.01216.50
7.4.110.0100.01316.36
7.4.100.0030.01416.32
7.4.90.0140.00616.58
7.4.80.0200.00019.39
7.4.70.0140.00416.54
7.4.60.0040.01216.53
7.4.50.0040.00816.52
7.4.40.0060.01216.27
7.4.00.0090.00915.11
7.3.330.0020.00213.33
7.3.320.0050.00013.44
7.3.310.0000.00716.23
7.3.300.0030.00316.28
7.3.290.0030.00316.34
7.3.280.0070.01016.40
7.3.260.0110.00816.55
7.3.240.0100.01116.41
7.3.230.0050.01116.38
7.3.210.0100.00716.43
7.3.200.0130.00316.57
7.3.190.0100.01316.67
7.3.180.0130.00316.47
7.3.170.0000.01816.39
7.3.160.0070.01116.46
7.3.120.0070.00915.04
7.3.110.0080.01015.02
7.3.100.0020.01114.77
7.3.90.0020.00914.76
7.3.80.0060.00514.71
7.3.70.0030.00814.91
7.3.60.0070.00314.71
7.3.50.0070.00514.99
7.3.40.0030.00714.94
7.3.30.0060.00914.92
7.3.20.0070.01016.66
7.3.10.0090.00816.50
7.3.00.0010.01016.77
7.2.330.0090.00916.61
7.2.320.0130.01316.77
7.2.310.0100.01316.59
7.2.300.0110.01116.62
7.2.290.0160.00616.64
7.2.250.0070.01114.82
7.2.240.0050.01215.25
7.2.230.0100.00514.86
7.2.220.0070.00715.24
7.2.210.0080.00615.17
7.2.200.0020.01015.01
7.2.190.0050.01115.11
7.2.180.0040.00714.94
7.2.170.0070.00814.97
7.2.70.0240.01215.08
7.2.60.0330.01915.07
7.2.50.0370.01115.10
7.2.40.0400.00414.93
7.2.30.0550.00314.91
7.2.20.0350.01614.91
7.2.10.0410.01315.11
7.2.00.0380.00615.02
7.1.330.0070.00715.74
7.1.320.0050.00715.69
7.1.310.0050.00915.89
7.1.300.0050.00715.70
7.1.290.0050.00815.87
7.1.280.0030.00715.66
7.1.270.0030.00815.82
7.1.260.0060.00815.70
7.1.200.0030.01015.73
7.1.170.0240.01014.10
7.1.160.0390.00913.82
7.1.150.0320.00613.93
7.1.140.0480.00613.75
7.1.130.0300.01013.96
7.1.120.0400.01013.93
7.1.110.0520.00613.89
7.1.100.0380.00713.96
7.1.90.0370.01013.89
7.1.80.0400.00913.56
7.1.70.0460.00913.49
7.1.60.0710.01631.89
7.1.50.0660.01631.88
7.1.40.0800.00731.27
7.1.30.1630.01331.71
7.1.20.0690.01731.74
7.1.10.0470.00713.84
7.1.00.0460.00013.86

preferences:
116.07 ms | 1531 KiB | 5 Q