3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { yield from seven_eight(); return 'ok'; } function seven_eight() { foreach ([1, 2, 3] as $k => $v) {yield $v;} } $gen = count_to_ten(); foreach ($gen as $k => $num) { echo "\n-$k -> $num \n"; echo $gen->send('t'); } var_dump( $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.0130.01316.75
8.3.50.0070.00716.38
8.3.40.0070.00718.67
8.3.30.0040.01118.51
8.3.20.0040.00420.36
8.3.10.0080.00023.48
8.3.00.0000.00817.72
8.2.180.0070.00716.63
8.2.170.0090.00622.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00321.09
8.2.120.0000.00726.35
8.2.110.0060.00320.56
8.2.100.0040.00817.78
8.2.90.0040.00419.23
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0030.00617.80
8.2.50.0000.00818.10
8.2.40.0000.00822.18
8.2.30.0040.00421.11
8.2.20.0040.00418.11
8.2.10.0000.00718.07
8.2.00.0000.00818.17
8.1.280.0070.01025.92
8.1.270.0000.00823.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00522.50
8.1.230.0070.00419.04
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0080.00017.35
8.1.180.0070.00018.10
8.1.170.0070.00418.46
8.1.160.0040.00418.93
8.1.150.0070.00018.81
8.1.140.0080.00019.54
8.1.130.0030.00318.85
8.1.120.0000.00717.37
8.1.110.0050.00517.33
8.1.100.0030.00717.43
8.1.90.0030.00517.46
8.1.80.0070.00017.36
8.1.70.0040.00417.42
8.1.60.0040.00417.51
8.1.50.0040.00417.41
8.1.40.0090.00017.59
8.1.30.0040.00417.55
8.1.20.0000.00817.66
8.1.10.0040.00417.50
8.1.00.0070.00017.50
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.45
8.0.270.0030.00517.17
8.0.260.0030.00316.81
8.0.250.0030.00316.93
8.0.240.0070.00016.98
8.0.230.0060.00317.00
8.0.220.0030.00316.79
8.0.210.0040.00416.82
8.0.200.0000.00716.92
8.0.190.0000.00916.98
8.0.180.0030.00516.95
8.0.170.0070.00016.85
8.0.160.0000.00716.98
8.0.150.0070.00016.75
8.0.140.0000.00716.86
8.0.130.0030.00313.32
8.0.120.0040.00416.82
8.0.110.0000.00716.95
8.0.100.0030.00416.87
8.0.90.0000.00716.96
8.0.80.0070.01016.95
8.0.70.0040.00416.84
8.0.60.0040.00416.94
8.0.50.0000.00716.84
8.0.30.0130.00517.05
8.0.20.0090.01117.40
8.0.10.0040.00416.91
8.0.00.0090.00816.61
7.4.330.0050.00015.55
7.4.320.0060.00016.53
7.4.300.0040.00416.41
7.4.290.0060.00316.65
7.4.280.0000.00816.60
7.4.270.0030.00316.51
7.4.260.0000.00716.39
7.4.250.0050.00216.49
7.4.240.0000.00716.49
7.4.230.0070.00016.40
7.4.220.0090.01516.38
7.4.210.0100.01016.71
7.4.200.0070.00016.34
7.4.160.0140.00316.52
7.4.150.0120.00817.40
7.4.140.0080.01017.86
7.4.130.0090.00916.74
7.4.120.0070.01016.40
7.4.110.0070.01116.42
7.4.100.0160.00416.70
7.4.90.0110.00616.49
7.4.80.0130.00619.39
7.4.70.0060.01516.34
7.4.60.0040.01516.65
7.4.50.0040.01116.52
7.4.40.0130.00316.49
7.4.30.0100.00616.52
7.4.10.0070.01115.15
7.4.00.0070.00914.86
7.3.330.0000.00613.20
7.3.320.0000.00613.37
7.3.310.0000.00716.42
7.3.300.0070.00016.32
7.3.290.0120.00216.36
7.3.280.0090.00816.32
7.3.270.0100.00717.40
7.3.260.0110.00616.48
7.3.250.0090.00916.53
7.3.240.0070.01016.54
7.3.230.0190.00316.42
7.3.210.0130.00316.59
7.3.200.0070.00716.36
7.3.190.0060.00916.66
7.3.180.0060.01016.50
7.3.170.0070.01016.59
7.3.160.0140.00716.27
7.3.130.0070.00714.83
7.3.120.0110.00714.91
7.3.110.0060.01014.79
7.3.100.0100.00514.79
7.3.90.0080.00714.75
7.3.80.0050.01014.82
7.3.70.0080.00514.88
7.3.60.0090.00714.81
7.3.50.0070.00914.82
7.3.40.0080.00814.98
7.3.30.0090.00414.74
7.3.20.0070.00516.66
7.3.10.0070.00816.57
7.3.00.0110.00916.55
7.2.330.0070.01116.83
7.2.320.0060.01216.80
7.2.310.0090.00816.82
7.2.300.0140.00616.52
7.2.290.0120.00916.66
7.2.260.0070.01115.05
7.2.250.0080.00815.25
7.2.240.0070.00914.87
7.2.230.0080.00715.07
7.2.220.0000.01515.12
7.2.210.0000.01214.81
7.2.200.0070.00715.02
7.2.190.0040.01015.01
7.2.180.0070.00915.05
7.2.170.0050.00615.08
7.2.160.0000.01214.89
7.2.150.0000.01416.93
7.2.140.0000.01816.96
7.2.130.0120.01016.71
7.2.120.0080.00916.74
7.2.110.0130.00716.86
7.2.100.0060.01316.77
7.2.90.0130.00516.99
7.2.80.0090.00716.76
7.2.70.0070.01016.77
7.2.60.0050.01316.63
7.2.50.0140.00916.99
7.2.40.0160.00716.36
7.2.30.0120.00416.47
7.2.20.0110.00916.95
7.2.10.0040.00916.82
7.2.00.0040.01117.65
7.1.330.0030.01215.74
7.1.320.0070.00715.87
7.1.310.0060.00815.66
7.1.300.0110.00415.66
7.1.290.0030.00815.73
7.1.280.0030.01015.80
7.1.270.0060.00615.77
7.1.260.0050.00715.64
7.1.250.0050.01015.68
7.1.240.0030.00715.92
7.1.230.0000.01515.64
7.1.220.0090.00615.88
7.1.210.0090.00315.87
7.1.200.0220.00615.73
7.1.190.0050.00315.57
7.1.180.0040.00415.85
7.1.170.0000.01415.57
7.1.160.0030.00915.86
7.1.150.0070.00715.78
7.1.140.0030.01015.70
7.1.130.0000.01215.57
7.1.120.0100.00715.77
7.1.110.0040.01115.88
7.1.100.0070.00716.85
7.1.90.0030.01215.75
7.1.80.0060.00315.66
7.1.70.0090.00616.44
7.1.60.0130.00725.41
7.1.50.0120.00825.19
7.1.40.0150.00325.15
7.1.30.0100.01225.00
7.1.20.0070.01525.17
7.1.10.0060.00816.17
7.1.00.0010.01216.24
7.0.330.0020.00515.43
7.0.320.0060.00615.05
7.0.310.0060.00615.32
7.0.300.0090.00615.43
7.0.290.0060.00915.07
7.0.280.0110.00415.39
7.0.270.0080.00015.37
7.0.260.0030.00715.05
7.0.250.0110.00715.10
7.0.240.0030.00715.12
7.0.230.0040.01215.60
7.0.220.0030.00915.52
7.0.210.0070.00715.37
7.0.200.0060.00816.10
7.0.190.0050.00816.14
7.0.180.0040.00915.85
7.0.170.0050.00815.95
7.0.160.0060.00515.83
7.0.150.0060.00615.78
7.0.140.0070.00615.94
7.0.130.0050.01015.96
7.0.120.0040.00815.98
7.0.110.0080.00515.67
7.0.100.0080.00915.97
7.0.90.0070.00915.89
7.0.80.0050.00815.83
7.0.70.0020.01416.02
7.0.60.0060.00915.74
7.0.50.0030.01015.92
7.0.40.0070.00715.00
7.0.30.0040.01014.76
7.0.20.0060.00914.89
7.0.10.0050.00814.96
7.0.00.0060.00914.82
5.6.400.0000.01414.13
5.6.390.0060.00613.93
5.6.380.0080.00313.65
5.6.370.0100.00014.33
5.6.360.0030.01014.33
5.6.350.0030.01013.64
5.6.340.0090.00614.27
5.6.330.0000.01513.93
5.6.320.0030.00714.18
5.6.310.0030.00813.78
5.6.300.0030.00714.07
5.6.290.0000.01514.23
5.6.280.0090.00614.27
5.6.270.0000.01413.88
5.6.260.0070.00714.01
5.6.250.0070.00714.01
5.6.240.0030.00913.89
5.6.230.0030.00614.13
5.6.220.0100.00314.13
5.6.210.0030.00914.34
5.6.200.0000.01113.98
5.6.190.0080.00614.03
5.6.180.0000.00913.96
5.6.170.0070.00714.10
5.6.160.0100.00614.12
5.6.150.0030.01513.92
5.6.140.0040.01113.90
5.6.130.0000.01414.27
5.6.120.0030.00913.94
5.6.110.0070.00714.00
5.6.100.0120.00314.29
5.6.90.0000.01214.26
5.6.80.0070.00714.09
5.6.70.0030.01013.95
5.6.60.0070.00713.95
5.6.50.0060.00913.80
5.6.40.0030.01014.11
5.6.30.0060.00914.10
5.6.20.0150.00413.75
5.6.10.0120.00814.03
5.6.00.0030.00913.95

preferences:
60.89 ms | 401 KiB | 5 Q