3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen($x) { yield $x; } function yf() { yield from gen(1); yield from gen(2); return yield from gen(42); } $g = yf(); foreach($g as $val) { var_dump($val); } echo "====================\n"; var_dump($g->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.0040.01816.63
8.3.50.0160.00822.05
8.3.40.0110.00418.71
8.3.30.0110.00318.76
8.3.20.0060.00320.33
8.3.10.0050.00323.71
8.3.00.0160.00019.25
8.2.180.0110.00418.16
8.2.170.0080.01222.96
8.2.160.0130.00320.30
8.2.150.0060.00324.18
8.2.140.0050.00224.66
8.2.130.0110.00417.38
8.2.120.0040.00426.35
8.2.110.0030.00720.52
8.2.100.0090.00317.93
8.2.90.0040.00419.27
8.2.80.0000.00817.97
8.2.70.0050.00317.50
8.2.60.0080.00017.68
8.2.50.0040.00418.07
8.2.40.0000.00719.41
8.2.30.0000.00720.69
8.2.20.0050.00317.56
8.2.10.0050.00318.11
8.2.00.0050.00217.98
8.1.280.0070.00725.92
8.1.270.0040.00422.19
8.1.260.0090.00928.09
8.1.250.0040.00428.09
8.1.240.0000.00922.47
8.1.230.0090.00317.78
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00817.38
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0070.00018.69
8.1.160.0000.00821.89
8.1.150.0000.00718.84
8.1.140.0000.00819.57
8.1.130.0030.00317.70
8.1.120.0000.00717.44
8.1.110.0030.00517.42
8.1.100.0070.00017.37
8.1.90.0030.00517.50
8.1.80.0030.00517.45
8.1.70.0000.00717.36
8.1.60.0040.00717.52
8.1.50.0050.00517.44
8.1.40.0060.00317.49
8.1.30.0000.00817.70
8.1.20.0000.00817.51
8.1.10.0040.00417.43
8.1.00.0000.00917.43
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0070.00018.35
8.0.270.0040.00417.21
8.0.260.0000.00717.30
8.0.250.0040.00416.99
8.0.240.0040.00416.93
8.0.230.0040.00416.90
8.0.220.0040.00416.86
8.0.210.0070.00316.97
8.0.200.0000.00616.94
8.0.190.0040.00416.95
8.0.180.0040.00416.91
8.0.170.0040.00416.89
8.0.160.0040.00316.89
8.0.150.0040.00416.86
8.0.140.0070.00416.79
8.0.130.0030.00313.36
8.0.120.0040.00416.88
8.0.110.0070.00016.86
8.0.100.0040.00416.85
8.0.90.0000.00816.80
8.0.80.0130.00316.79
8.0.70.0000.00816.80
8.0.60.0040.00416.96
8.0.50.0070.00016.71
8.0.30.0090.01417.04
8.0.20.0120.00717.40
8.0.10.0040.00317.01
8.0.00.0100.00916.81
7.4.330.0000.00515.13
7.4.320.0000.00716.51
7.4.300.0000.00716.50
7.4.290.0070.00016.49
7.4.280.0000.00716.61
7.4.270.0000.00716.63
7.4.260.0040.00416.51
7.4.250.0040.00416.57
7.4.240.0000.00716.52
7.4.230.0030.00316.67
7.4.220.0040.01516.60
7.4.210.0120.00516.58
7.4.200.0030.00316.49
7.4.160.0070.00716.59
7.4.150.0140.01017.40
7.4.140.0030.01517.86
7.4.130.0100.01516.54
7.4.120.0090.00916.64
7.4.110.0090.00916.58
7.4.100.0100.00716.54
7.4.90.0040.01416.69
7.4.80.0030.01419.39
7.4.70.0130.00316.57
7.4.60.0080.00816.57
7.4.50.0020.00216.36
7.4.40.0080.00816.38
7.4.30.0110.00616.46
7.4.10.0080.00914.88
7.4.00.0040.01214.93
7.3.330.0040.00413.34
7.3.320.0000.00613.45
7.3.310.0000.00716.27
7.3.300.0000.00716.37
7.3.290.0030.00316.35
7.3.280.0040.01516.37
7.3.270.0100.00617.40
7.3.260.0100.00716.54
7.3.240.0090.00916.61
7.3.230.0070.01016.39
7.3.210.0080.00816.48
7.3.200.0120.00416.47
7.3.190.0060.00916.46
7.3.180.0090.00916.42
7.3.170.0090.00916.41
7.3.160.0130.00316.47
7.3.130.0110.00714.46
7.3.120.0070.00714.73
7.3.110.0030.01614.77
7.3.100.0090.00614.68
7.3.90.0090.00614.75
7.3.80.0000.00914.74
7.3.70.0060.00914.99
7.3.60.0040.00414.54
7.3.50.0060.00914.61
7.3.40.0070.00714.46
7.3.30.0040.01114.59
7.3.20.0080.00816.51
7.3.10.0070.00416.67
7.3.00.0030.01016.55
7.2.330.0070.01716.49
7.2.320.0090.00916.65
7.2.310.0080.01116.56
7.2.300.0070.01116.60
7.2.290.0170.00616.54
7.2.260.0110.00814.66
7.2.250.0030.01615.16
7.2.240.0070.01015.13
7.2.230.0110.00315.20
7.2.220.0080.00615.15
7.2.210.0090.00614.94
7.2.200.0070.01115.08
7.2.190.0060.00614.87
7.2.180.0090.00015.04
7.2.170.0080.00814.98
7.2.160.0060.00914.90
7.2.150.0050.00516.74
7.2.140.0030.01216.63
7.2.130.0040.01216.66
7.2.120.0140.00016.59
7.2.110.0090.00616.61
7.2.100.0000.01016.75
7.2.90.0030.01016.72
7.2.80.0070.00716.89
7.2.70.0070.01016.89
7.2.60.0090.00716.83
7.2.50.0070.01016.80
7.2.40.0030.01016.85
7.2.30.0060.00616.74
7.2.20.0110.00717.00
7.2.10.0030.00916.73
7.2.00.0030.01018.13
7.1.330.0040.01115.71
7.1.320.0030.01215.94
7.1.310.0120.00315.95
7.1.300.0120.00315.29
7.1.290.0040.01115.70
7.1.280.0000.01115.47
7.1.270.0100.00015.53
7.1.260.0000.01315.41
7.1.250.0000.01315.70
7.1.240.0060.00915.38
7.1.230.0000.00915.48
7.1.220.0040.00815.71
7.1.210.0040.00815.54
7.1.200.0040.00515.66
7.1.190.0030.01415.79
7.1.180.0130.00615.32
7.1.170.0030.01515.75
7.1.160.0100.00315.55
7.1.150.0070.00715.84
7.1.140.0100.00715.74
7.1.130.0000.01115.65
7.1.120.0040.00415.67
7.1.110.0100.00315.68
7.1.100.0050.01016.80
7.1.90.0060.00915.52
7.1.80.0070.01115.71
7.1.70.0020.01116.32
7.1.60.0070.01117.59
7.1.50.0030.00816.15
7.1.40.0040.01116.01
7.1.30.0000.01015.54
7.1.20.0040.00815.77
7.1.10.0070.00715.67
7.1.00.0090.03919.12
7.0.330.0000.01415.33
7.0.320.0030.01015.18
7.0.310.0100.00315.09
7.0.300.0070.01015.14
7.0.290.0060.00614.94
7.0.280.0000.01015.20
7.0.270.0030.00915.15
7.0.260.0040.00815.27
7.0.250.0060.00615.04
7.0.240.0000.01315.59
7.0.230.0070.00715.24
7.0.220.0030.01315.14
7.0.210.0080.00315.42
7.0.200.0100.00215.27
7.0.190.0030.01015.43
7.0.180.0030.01015.47
7.0.170.0070.00715.37
7.0.160.0130.00015.33
7.0.150.0090.00615.37
7.0.140.0060.00915.36
7.0.130.0040.00715.23
7.0.120.0000.00815.48
7.0.110.0060.00615.30
7.0.100.0090.00615.09
7.0.90.0080.00415.27
7.0.80.0040.00815.25
7.0.70.0060.00615.34
7.0.60.0050.02717.57
7.0.50.0030.04716.66
7.0.40.0050.04616.75
7.0.30.0160.03316.66
7.0.20.0220.03916.65
7.0.10.0030.04816.79
7.0.00.0020.03116.75
5.6.400.0000.01413.84
5.6.390.0060.00314.18
5.6.380.0030.00613.85
5.6.370.0070.00414.10
5.6.360.0050.00514.36
5.6.350.0040.00814.13
5.6.340.0060.01014.13
5.6.330.0000.01513.88
5.6.320.0060.01014.20
5.6.310.0030.00914.17
5.6.300.0000.01514.03
5.6.290.0000.01014.08
5.6.280.0020.04317.65
5.6.270.0100.00313.75
5.6.260.0090.00613.98
5.6.250.0040.00413.96
5.6.240.0040.01114.05
5.6.230.0080.00813.90
5.6.220.0030.00713.58
5.6.210.0050.04617.18
5.6.200.0100.04016.13
5.6.190.0050.03217.38
5.6.180.0140.02417.18
5.6.170.0100.03117.28
5.6.160.0090.04617.17
5.6.150.0060.02216.00
5.6.140.0060.04216.10
5.6.130.0050.02716.09
5.6.120.0050.03117.62
5.6.110.0070.02617.59
5.6.100.0050.04517.32
5.6.90.0030.03717.45
5.6.80.0070.02017.18
5.6.70.0030.01213.95
5.6.60.0000.01113.82
5.6.50.0040.00813.61
5.6.40.0030.00914.05
5.6.30.0030.00613.68
5.6.20.0060.00913.95
5.6.10.0000.01413.69
5.6.00.0070.00313.86
5.5.380.0090.00914.03
5.5.370.0060.00814.05
5.5.360.0000.01114.05
5.5.350.1950.02417.39
5.5.340.0020.02415.98
5.5.330.0060.02317.28
5.5.320.0120.02117.12
5.5.310.0200.02717.34
5.5.300.0030.02515.95
5.5.290.0050.02816.19
5.5.280.0090.04317.41
5.5.270.0090.03117.39
5.5.260.0050.02417.45
5.5.250.0050.02817.33
5.5.240.0180.03016.93
5.5.230.0040.01413.94
5.5.220.0080.00814.24
5.5.210.0040.01113.69
5.5.200.0030.01013.46
5.5.190.0090.00313.58
5.5.180.0000.01513.86
5.5.170.0030.01313.75
5.5.160.0030.00714.14
5.5.150.0000.01313.77
5.5.140.0030.01314.07
5.5.130.0030.00713.63
5.5.120.0030.01013.99
5.5.110.0030.01014.13
5.5.100.0070.00714.13
5.5.90.0070.00713.97
5.5.80.0030.01013.77
5.5.70.0060.00313.53
5.5.60.0000.01413.84
5.5.50.0030.01113.66
5.5.40.0080.00614.12
5.5.30.0060.00613.99
5.5.20.0000.01113.66
5.5.10.0040.00713.99
5.5.00.0030.01013.61

preferences:
39.53 ms | 401 KiB | 5 Q