3v4l.org

run code in 300+ PHP versions simultaneously
<?php function holy_grail_countdown($number) { while (0 < $number) { $reset = (yield $number); $number = $reset ?: $number - 1; } } $c = holy_grail_countdown(5); foreach ($c as $number) { echo "$number\n"; // outputs 5, then 2 and finally 1. if (5 === $number) { $c->send(3); } }

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.40.0040.01118.80
8.3.30.0100.00318.95
8.3.20.0070.00020.20
8.3.10.0000.00822.10
8.3.00.0040.00422.46
8.2.170.0110.00322.96
8.2.160.0100.00319.26
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0080.00019.23
8.2.110.0040.00422.20
8.2.100.0040.00719.57
8.2.90.0040.00419.04
8.2.80.0040.00717.97
8.2.70.0060.00317.63
8.2.60.0000.00717.80
8.2.50.0000.00818.07
8.2.40.0080.00020.01
8.2.30.0000.00818.06
8.2.20.0040.00417.54
8.2.10.0040.00417.70
8.2.00.0000.00717.72
8.1.270.0040.00422.17
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0030.00623.78
8.1.230.0000.01219.13
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0060.00317.52
8.1.180.0030.00518.71
8.1.170.0030.00618.49
8.1.160.0030.00322.08
8.1.150.0040.00418.59
8.1.140.0030.00517.38
8.1.130.0000.00817.46
8.1.120.0070.00017.36
8.1.110.0040.00417.52
8.1.100.0040.00417.38
8.1.90.0040.00417.53
8.1.80.0000.00817.42
8.1.70.0000.00717.42
8.1.60.0040.00417.62
8.1.50.0040.00417.58
8.1.40.0040.00417.58
8.1.30.0070.00017.49
8.1.20.0050.00317.73
8.1.10.0040.00417.46
8.1.00.0040.00417.32
8.0.300.0000.00718.77
8.0.290.0000.00717.28
8.0.280.0070.00018.50
8.0.270.0030.00317.33
8.0.260.0000.00716.70
8.0.250.0040.00416.98
8.0.240.0070.00016.87
8.0.230.0050.00316.97
8.0.220.0000.00716.88
8.0.210.0070.00016.79
8.0.200.0040.00416.88
8.0.190.0030.00516.99
8.0.180.0000.00716.93
8.0.170.0040.00416.89
8.0.160.0000.00816.80
8.0.150.0030.00316.82
8.0.140.0000.00716.80
8.0.130.0030.00313.36
8.0.120.0080.00016.76
8.0.110.0040.00416.93
8.0.100.0040.00416.90
8.0.90.0000.00717.02
8.0.80.0130.00616.99
8.0.70.0040.00416.79
8.0.60.0030.00516.73
8.0.50.0070.00016.77
8.0.30.0120.00717.18
8.0.20.0070.01117.40
8.0.10.0000.00716.84
8.0.00.0090.01116.80
7.4.330.0030.00315.09
7.4.320.0000.00716.61
7.4.300.0030.00316.52
7.4.290.0000.00716.46
7.4.280.0000.00716.48
7.4.270.0020.00516.64
7.4.260.0000.00716.64
7.4.250.0030.00616.55
7.4.240.0030.00416.50
7.4.230.0050.00216.73
7.4.220.0130.00316.57
7.4.210.0100.00516.54
7.4.200.0030.00316.71
7.4.190.0030.00316.79
7.4.160.0090.00616.57
7.4.150.0100.00717.40
7.4.140.0110.00917.86
7.4.130.0090.00816.50
7.4.120.0150.00216.57
7.4.110.0110.01116.61
7.4.100.0100.01416.34
7.4.90.0060.01116.49
7.4.80.0090.00919.39
7.4.70.0100.01016.45
7.4.60.0120.00816.46
7.4.50.0070.00016.32
7.4.40.0160.00022.77
7.4.30.0030.01316.77
7.4.00.0030.01314.81
7.3.330.0000.00513.35
7.3.320.0050.00013.22
7.3.310.0000.00716.27
7.3.300.0030.00316.31
7.3.290.0060.01016.42
7.3.280.0040.01216.40
7.3.270.0070.01017.40
7.3.260.0100.01016.30
7.3.250.0090.00816.37
7.3.240.0060.01016.63
7.3.230.0120.00916.44
7.3.210.0090.00916.37
7.3.200.0030.01519.39
7.3.190.0100.01316.28
7.3.180.0110.00916.51
7.3.170.0170.00016.52
7.3.160.0120.00316.51
7.3.120.0030.01014.97
7.2.330.0070.01016.70
7.2.320.0040.01116.58
7.2.310.0060.01216.68
7.2.300.0090.00616.45
7.2.290.0060.01616.73
7.2.00.0070.00719.50
7.1.200.0030.00715.64
7.1.100.0030.00918.23
7.1.70.0100.00717.17
7.1.60.0040.00719.82
7.1.50.0060.01317.11
7.1.00.0100.07022.40
7.0.200.0020.00516.68
7.0.140.0100.07021.92
7.0.100.0170.07019.90
7.0.90.0300.05719.93
7.0.80.0100.07319.98
7.0.70.0230.07720.01
7.0.60.0070.06320.06
7.0.50.0130.07720.25
7.0.40.0070.07320.02
7.0.30.0070.03720.03
7.0.20.0130.03320.13
7.0.10.0070.04019.99
7.0.00.0030.04320.17
5.6.280.0030.07320.89
5.6.250.0070.04720.69
5.6.240.0130.07320.67
5.6.230.0030.06020.75
5.6.220.0100.08320.52
5.6.210.0030.08020.59
5.6.200.0030.05021.05
5.6.190.0070.08021.13
5.6.180.0100.03720.96
5.6.170.0070.04021.06
5.6.160.0170.03321.13
5.6.150.0070.04020.96
5.6.140.0030.04321.00
5.6.130.0170.03021.07
5.6.120.0030.04320.97
5.6.110.0030.04021.17
5.6.100.0100.03320.94
5.6.90.0130.03021.01
5.6.80.0000.04020.47
5.6.70.0030.04320.50
5.6.60.0030.04020.50
5.6.50.0030.04020.51
5.6.40.0100.03720.53
5.6.30.0130.03020.31
5.6.20.0030.03320.41
5.6.10.0000.04320.39
5.6.00.0030.03320.36
5.5.380.0030.05720.35
5.5.370.0100.07720.38
5.5.360.0030.08320.34
5.5.350.0070.04320.34
5.5.340.0100.07320.82
5.5.330.0170.07320.83
5.5.320.0100.03720.90
5.5.310.0130.03020.89
5.5.300.0000.04320.91
5.5.290.0070.04020.78
5.5.280.0070.03720.90
5.5.270.0030.04320.79
5.5.260.0130.03020.73
5.5.250.0070.04020.72
5.5.240.0030.04320.19
5.5.230.0030.04320.24
5.5.220.0000.05720.30
5.5.210.0000.05020.16
5.5.200.0030.03720.16
5.5.190.0000.04320.24
5.5.180.0030.04020.22
5.5.160.0030.04020.14
5.5.150.0030.03720.25
5.5.140.0070.03319.98
5.5.130.0070.03019.96
5.5.120.0070.03720.14
5.5.110.0100.03720.25
5.5.100.0100.02720.05
5.5.90.0000.03320.12
5.5.80.0070.03320.00
5.5.70.0030.04020.04
5.5.60.0000.04320.12
5.5.50.0000.06320.15
5.5.40.0030.03320.06
5.5.30.0100.08019.96
5.5.20.0130.07320.09
5.5.10.0070.04020.02
5.5.00.0100.07320.06
5.4.450.0070.04719.46
5.4.440.0030.04319.38
5.4.430.0070.03719.19
5.4.420.0200.04319.41
5.4.410.0000.04319.38
5.4.400.0030.04019.21
5.4.390.0030.04019.04
5.4.380.0030.03719.20
5.4.370.0030.04018.88
5.4.360.0030.03719.23
5.4.350.0030.03719.18
5.4.340.0000.03719.23
5.4.320.0100.02719.18
5.4.310.0070.03319.03
5.4.300.0030.03019.05
5.4.290.0070.03019.18
5.4.280.0070.02719.20
5.4.270.0100.02319.21
5.4.260.0000.03319.00
5.4.250.0000.04718.84
5.4.240.0070.04318.89
5.4.230.0000.04019.17
5.4.220.0070.03719.02
5.4.210.0030.03318.90
5.4.200.0070.05719.09
5.4.190.0030.03719.09
5.4.180.0100.05718.89
5.4.170.0100.07019.11
5.4.160.0100.06319.19
5.4.150.0030.04319.03
5.4.140.0070.04716.41
5.4.130.0170.03016.51
5.4.120.0000.06316.43
5.4.110.0070.07316.39
5.4.100.0070.06716.42
5.4.90.0070.03716.42
5.4.80.0070.04016.38
5.4.70.0170.06316.46
5.4.60.0000.07716.45
5.4.50.0100.08316.45
5.4.40.0170.06016.39
5.4.30.0130.06316.30
5.4.20.0100.07316.35
5.4.10.0070.06716.36
5.4.00.0070.07715.69
5.3.290.0030.03014.73
5.3.280.0000.03714.55
5.3.270.0030.03714.66
5.3.260.0100.07314.64
5.3.250.0070.08014.54
5.3.240.0130.06714.54
5.3.230.0100.07014.53
5.3.220.0030.08014.58
5.3.210.0030.04314.56
5.3.200.0070.06014.63
5.3.190.0070.05314.55
5.3.180.0000.04714.69
5.3.170.0130.06714.66
5.3.160.0070.05714.66
5.3.150.0070.04314.66
5.3.140.0070.07314.48
5.3.130.0030.07314.66
5.3.120.0130.07014.48
5.3.110.0100.05314.48
5.3.100.0030.06313.96
5.3.90.0070.07014.05
5.3.80.0100.05014.08
5.3.70.0200.06014.04
5.3.60.0100.07314.05
5.3.50.0100.06714.04
5.3.40.0100.07013.83
5.3.30.0070.06713.91
5.3.20.0070.07013.61
5.3.10.0000.07713.71
5.3.00.0070.06313.64
5.2.170.0030.06011.04
5.2.160.0130.05311.00
5.2.150.0070.05011.20
5.2.140.0070.06311.18
5.2.130.0100.05711.11
5.2.120.0070.06311.16
5.2.110.0100.04311.08
5.2.100.0030.06311.13
5.2.90.0000.05711.19
5.2.80.0100.02711.08
5.2.70.0070.06011.09
5.2.60.0000.03711.13
5.2.50.0070.06311.04
5.2.40.0070.03711.04
5.2.30.0100.05711.03
5.2.20.0100.03010.88
5.2.10.0030.02710.93
5.2.00.0100.05310.63
5.1.60.0030.0239.98
5.1.50.0070.02710.10
5.1.40.0030.0239.81
5.1.30.0070.02710.46
5.1.20.0070.03310.34
5.1.10.0130.03310.12
5.1.00.0100.02310.16
5.0.50.0070.0339.18
5.0.40.0030.0279.18
5.0.30.0000.0709.18
5.0.20.0070.0409.18
5.0.10.0030.0379.18
5.0.00.0030.0339.18
4.4.90.0030.0179.18
4.4.80.0000.0379.18
4.4.70.0030.0339.18
4.4.60.0000.0279.18
4.4.50.0070.0239.18
4.4.40.0070.0309.18
4.4.30.0070.0309.18
4.4.20.0000.0379.18
4.4.10.0030.0379.18
4.4.00.0030.0539.18
4.3.110.0030.0179.18
4.3.100.0100.0309.18
4.3.90.0030.0309.18
4.3.80.0000.0509.18
4.3.70.0030.0339.18
4.3.60.0000.0339.18
4.3.50.0030.0309.18
4.3.40.0000.0539.18
4.3.30.0000.0239.18
4.3.20.0000.0309.18
4.3.10.0030.0179.18
4.3.00.0030.0339.18

preferences:
41.59 ms | 400 KiB | 5 Q