3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { $t = yield; echo '$'.($t); 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.0040.01118.42
8.3.50.0060.01516.22
8.3.40.0030.01418.84
8.3.30.0070.00718.60
8.3.20.0050.00321.95
8.3.10.0040.00421.76
8.3.00.0030.00517.56
8.2.180.0130.00716.50
8.2.170.0110.00422.96
8.2.160.0110.00420.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.18
8.2.120.0090.00026.35
8.2.110.0060.00322.24
8.2.100.0120.00017.84
8.2.90.0040.00419.05
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0060.00317.90
8.2.50.0000.00818.10
8.2.40.0000.00720.55
8.2.30.0050.00321.03
8.2.20.0070.00017.98
8.2.10.0040.00418.10
8.2.00.0040.00318.16
8.1.280.0120.00325.92
8.1.270.0110.00423.92
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0080.00421.95
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0060.00318.36
8.1.160.0030.00519.01
8.1.150.0040.00418.89
8.1.140.0040.00419.49
8.1.130.0000.00818.80
8.1.120.0040.00417.48
8.1.110.0030.00517.48
8.1.100.0000.00817.37
8.1.90.0040.00417.34
8.1.80.0030.00317.39
8.1.70.0000.00717.34
8.1.60.0000.00917.61
8.1.50.0040.00417.57
8.1.40.0080.00017.48
8.1.30.0020.00517.68
8.1.20.0000.00717.49
8.1.10.0090.00017.51
8.1.00.0040.00417.38
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0040.00418.43
8.0.270.0000.00818.52
8.0.260.0000.00716.72
8.0.250.0030.00316.85
8.0.240.0030.00316.91
8.0.230.0000.00716.84
8.0.220.0040.00416.90
8.0.210.0040.00416.78
8.0.200.0050.00316.89
8.0.190.0000.00916.98
8.0.180.0070.00016.88
8.0.170.0040.00416.91
8.0.160.0040.00416.94
8.0.150.0000.00716.88
8.0.140.0000.00816.79
8.0.130.0000.00613.30
8.0.120.0080.00016.85
8.0.110.0040.00416.75
8.0.100.0070.00016.95
8.0.90.0080.00016.85
8.0.80.0060.00916.93
8.0.70.0070.00016.80
8.0.60.0040.00416.74
8.0.50.0070.00016.75
8.0.30.0080.01016.96
8.0.20.0110.01017.40
8.0.10.0040.00416.97
8.0.00.0100.00716.75
7.4.330.0050.00015.55
7.4.320.0000.00716.61
7.4.300.0060.00016.51
7.4.290.0060.00316.36
7.4.280.0000.00716.58
7.4.270.0000.00716.52
7.4.260.0030.00316.48
7.4.250.0050.00316.57
7.4.240.0040.00416.55
7.4.230.0030.00416.50
7.4.220.0040.01516.55
7.4.210.0040.01616.68
7.4.200.0050.00316.36
7.4.160.0080.00816.34
7.4.150.0070.01017.40
7.4.140.0140.00917.86
7.4.130.0030.01616.44
7.4.120.0080.01016.43
7.4.110.0070.01016.49
7.4.100.0090.01216.53
7.4.90.0100.01016.38
7.4.80.0060.01019.39
7.4.70.0030.01316.42
7.4.60.0080.00816.40
7.4.50.0060.00616.32
7.4.40.0110.00416.55
7.4.30.0030.01416.53
7.4.10.0070.01115.24
7.4.00.0060.01215.03
7.3.330.0060.00013.36
7.3.320.0050.00013.32
7.3.310.0070.00016.41
7.3.300.0080.00016.32
7.3.290.0050.00916.38
7.3.280.0070.00816.36
7.3.270.0070.01017.40
7.3.260.0220.01416.44
7.3.250.0110.01016.44
7.3.240.0090.00816.38
7.3.230.0130.00416.36
7.3.210.0070.01016.48
7.3.200.0080.00916.50
7.3.190.0100.00716.58
7.3.180.0140.00616.29
7.3.170.0100.00716.52
7.3.160.0090.00916.40
7.3.130.0060.00614.94
7.3.120.0110.00314.96
7.3.110.0120.01014.64
7.3.100.0070.00414.91
7.3.90.0060.00614.81
7.3.80.0020.01114.61
7.3.70.0070.00514.83
7.3.60.0040.00714.75
7.3.50.0020.01114.85
7.3.40.0030.00814.88
7.3.30.0090.00414.69
7.3.20.0030.01116.70
7.3.10.0050.00716.57
7.3.00.0080.00616.70
7.2.330.0110.01016.82
7.2.320.0030.01816.77
7.2.310.0090.00616.80
7.2.300.0070.01316.72
7.2.290.0070.01216.78
7.2.260.0040.01515.21
7.2.250.0100.01015.26
7.2.240.0100.00615.09
7.2.230.0090.00514.88
7.2.220.0050.00715.22
7.2.210.0050.00815.12
7.2.200.0030.01114.87
7.2.190.0090.00315.04
7.2.180.0040.01115.05
7.2.170.0050.00814.98
7.2.160.0120.00315.12
7.2.150.0090.00616.77
7.2.140.0070.01017.13
7.2.130.0060.01016.85
7.2.120.0020.01216.87
7.2.110.0030.01017.02
7.2.100.0110.00416.80
7.2.90.0070.00716.84
7.2.80.0050.00817.07
7.2.70.0050.00916.92
7.2.60.0080.00716.91
7.2.50.0090.00517.02
7.2.40.0030.01017.00
7.2.30.0070.00616.75
7.2.20.0070.00516.87
7.2.10.0010.01416.90
7.2.00.0060.00817.77
7.1.330.0080.00815.86
7.1.320.0090.00315.93
7.1.310.0040.00815.77
7.1.300.0080.00515.61
7.1.290.0100.00315.86
7.1.280.0080.00615.94
7.1.270.0050.00715.69
7.1.260.0050.00915.72
7.1.250.0050.00815.59
7.1.240.0120.00315.81
7.1.230.0040.00715.68
7.1.220.0030.01015.98
7.1.210.0000.01415.79
7.1.200.0080.00515.77
7.1.190.0070.00715.88
7.1.180.0030.00915.79
7.1.170.0030.00715.96
7.1.160.0070.00716.01
7.1.150.0100.00315.93
7.1.140.0030.00915.66
7.1.130.0060.00915.90
7.1.120.0060.00615.68
7.1.110.0060.00615.61
7.1.100.0040.00617.10
7.1.90.0040.01115.88
7.1.80.0090.00315.95
7.1.70.0060.01016.38
7.1.60.0130.01225.43
7.1.50.0130.01125.18
7.1.40.0130.01025.17
7.1.30.0080.01325.14
7.1.20.0160.01025.18
7.1.10.0050.01216.20
7.1.00.0090.01016.24
7.0.330.0100.00315.50
7.0.320.0070.00715.44
7.0.310.0060.00715.52
7.0.300.0100.00315.46
7.0.290.0030.00915.50
7.0.280.0040.00715.59
7.0.270.0000.00915.46
7.0.260.0060.00615.20
7.0.250.0040.01115.16
7.0.240.0080.00015.47
7.0.230.0030.00915.40
7.0.220.0100.00615.52
7.0.210.0100.00315.30
7.0.200.0090.00516.00
7.0.190.0000.01416.03
7.0.180.0040.00915.91
7.0.170.0050.01115.87
7.0.160.0080.00915.87
7.0.150.0030.00915.80
7.0.140.0040.01215.63
7.0.130.0030.01016.06
7.0.120.0030.01015.93
7.0.110.0040.01015.82
7.0.100.0070.00815.72
7.0.90.0050.00815.91
7.0.80.0070.00415.99
7.0.70.0050.01115.87
7.0.60.0060.00815.80
7.0.50.0090.00615.84
7.0.40.0020.01214.98
7.0.30.0050.01214.97
7.0.20.0070.00715.13
7.0.10.0080.00514.75
7.0.00.0080.00714.83
5.6.400.0060.00613.75
5.6.390.0000.01413.90
5.6.380.0090.00614.11
5.6.370.0040.00814.11
5.6.360.0060.00314.12
5.6.350.0000.01014.24
5.6.340.0070.00714.14
5.6.330.0090.00314.35
5.6.320.0000.01613.87
5.6.310.0070.00713.80
5.6.300.0040.00814.28
5.6.290.0070.00713.91
5.6.280.0140.00014.11
5.6.270.0030.00913.96
5.6.260.0080.00614.06
5.6.250.0040.01414.09
5.6.240.0030.00914.33
5.6.230.0000.01414.20
5.6.220.0030.00714.23
5.6.210.0070.00313.98
5.6.200.0000.01014.10
5.6.190.0050.00813.94
5.6.180.0090.00413.88
5.6.170.0040.00714.11
5.6.160.0030.00614.04
5.6.150.0060.00314.21
5.6.140.0000.01314.24
5.6.130.0040.00414.06
5.6.120.0000.01414.23
5.6.110.0080.00813.94
5.6.100.0060.00914.18
5.6.90.0030.01013.85
5.6.80.0090.00014.10
5.6.70.0030.00914.09
5.6.60.0080.00414.02
5.6.50.0000.01213.97
5.6.40.0000.01314.16
5.6.30.0100.00713.84
5.6.20.0060.00914.02
5.6.10.0080.00813.96
5.6.00.0040.01214.02

preferences:
30.22 ms | 400 KiB | 5 Q