3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($a) { if ($a > 0) { $b = f($a-1); } return $b; } echo f(1);

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.0.0beta10.0030.01416.52
8.0.0alpha30.0040.01416.49
8.0.0alpha20.0070.01116.56
8.0.0alpha10.0100.00616.57
7.4.80.0070.01519.39
7.4.70.0120.00316.39
7.4.60.0130.00316.40
7.4.50.0030.00516.69
7.4.40.0110.00622.77
7.4.30.0100.00716.44
7.4.00.0060.00614.67
7.3.200.0150.00619.39
7.3.190.0130.00316.38
7.3.180.0060.00916.46
7.3.170.0110.00616.29
7.3.160.0100.00716.47
7.3.120.0060.01214.80
7.3.10.0030.01016.66
7.3.00.0050.00516.71
7.2.320.0030.01716.51
7.2.310.0100.01016.50
7.2.300.0130.00816.55
7.2.290.0060.00916.55
7.2.130.0140.00316.71
7.2.120.0130.00016.48
7.2.110.0030.00616.60
7.2.100.0030.00616.81
7.2.90.0060.00916.84
7.2.80.0130.00616.77
7.2.70.0040.00716.70
7.2.60.0090.00916.76
7.2.50.0000.00916.77
7.2.40.0030.00716.75
7.2.30.0070.00416.98
7.2.20.0100.00316.48
7.2.10.0090.00616.75
7.2.00.0100.00716.91
7.1.250.0040.00715.52
7.1.70.0000.00717.13
7.1.60.0100.01319.40
7.1.50.0060.01916.90
7.1.00.0070.05722.30
7.0.200.0070.00716.85
7.0.140.0030.07322.08
7.0.60.0130.06719.91
7.0.50.0070.07317.83
7.0.40.0000.05317.72
7.0.30.0200.06717.69
7.0.20.0130.06017.78
7.0.10.0100.04717.81
7.0.00.0100.07717.75
5.6.280.0030.07320.89
5.6.210.0070.08720.75
5.6.200.0130.06018.18
5.6.190.0100.07718.21
5.6.180.0070.08018.28
5.6.170.0100.07718.19
5.6.160.0030.08718.22
5.6.150.0100.08018.28
5.6.140.0070.08318.28
5.6.130.0170.07318.18
5.6.120.0100.06018.17
5.6.110.0100.03318.27
5.6.100.0000.07318.14
5.6.90.0100.03318.14
5.6.80.0030.04017.50
5.6.70.0030.03717.57
5.6.60.0000.07317.61
5.6.50.0030.03717.63
5.6.40.0000.04017.55
5.6.30.0070.03717.51
5.6.20.0070.03317.47
5.6.10.0030.03717.49
5.6.00.0070.03317.53
5.5.350.3730.04720.41
5.5.340.0070.08017.94
5.5.330.0070.07317.98
5.5.320.0130.07718.14
5.5.310.0100.07318.08
5.5.300.0070.03718.03
5.5.290.0130.05318.08
5.5.280.0070.05718.07
5.5.270.0070.03718.08
5.5.260.0030.05018.08
5.5.250.0030.03717.79
5.5.240.0000.04017.44
5.5.230.0070.05317.45
5.5.220.0100.05717.42
5.5.210.0070.04017.52
5.5.200.0030.03717.31
5.5.190.0070.03717.31
5.5.180.0000.04017.38
5.5.160.0100.03017.31
5.5.150.0030.03717.42
5.5.140.0000.04017.43
5.5.130.0000.05717.43
5.5.120.0030.04317.29
5.5.110.0000.04017.36
5.5.100.0030.03717.24
5.5.90.0000.04017.19
5.5.80.0070.03317.20
5.5.70.0070.03317.16
5.5.60.0100.02717.16
5.5.50.0030.03717.31
5.5.40.0000.05317.20
5.5.30.0030.07317.31
5.5.20.0070.06017.21
5.5.10.0070.06017.19
5.5.00.0070.05017.19
5.4.450.0170.07719.45
5.4.440.0030.04019.33
5.4.430.0030.03719.43
5.4.420.0070.04019.59
5.4.410.0000.04019.25
5.4.400.0000.04019.06
5.4.390.0030.03719.02
5.4.380.0070.06319.03
5.4.370.0030.03719.04
5.4.360.0030.03719.14
5.4.350.0100.03019.13
5.4.340.0100.03018.89
5.4.320.0000.04019.10
5.4.310.0030.03719.02
5.4.300.0070.03319.03
5.4.290.0070.03319.05
5.4.280.0000.04019.11
5.4.270.0030.03719.04
5.4.260.0030.03718.95
5.4.250.0100.03319.03
5.4.240.0070.03318.98
5.4.230.0000.04019.19
5.4.220.0030.03718.98
5.4.210.0070.04318.88
5.4.200.0130.06719.11
5.4.190.0030.04018.88
5.4.180.0070.08019.12
5.4.170.0170.06718.94
5.4.160.0030.04719.00
5.4.150.0030.06719.12
5.4.140.0100.07016.40
5.4.130.0100.06316.43
5.4.120.0030.07316.46
5.4.110.0100.06316.50
5.4.100.0030.07316.23
5.4.90.0030.06716.58
5.4.80.0000.06016.54
5.4.70.0000.05716.45
5.4.60.0030.04016.21
5.4.50.0070.05316.56
5.4.40.0000.04716.39
5.4.30.0130.06316.41
5.4.20.0070.05716.44
5.4.10.0100.06016.29
5.4.00.0030.07315.83
5.3.290.0030.03714.70
5.3.280.0030.03714.65
5.3.270.0070.06714.61
5.3.260.0030.08314.56
5.3.250.0030.04314.70
5.3.240.0000.04714.61
5.3.230.0100.03314.64
5.3.220.0030.07314.66
5.3.210.0030.07714.59
5.3.200.0000.08014.61
5.3.190.0070.08014.52
5.3.180.0100.04714.52
5.3.170.0100.08014.51
5.3.160.0000.07314.58
5.3.150.0070.05714.55
5.3.140.0070.04314.51
5.3.130.0100.04314.58
5.3.120.0100.04314.54
5.3.110.0030.04714.75
5.3.100.0030.07314.09
5.3.90.0100.06314.04
5.3.80.0000.08014.11
5.3.70.0030.04014.05
5.3.60.0030.07014.04
5.3.50.0030.05013.97
5.3.40.0000.04714.01
5.3.30.0070.04013.80
5.3.20.0170.03313.60
5.3.10.0100.06713.74
5.3.00.0030.08013.65
5.2.170.0030.04311.15
5.2.160.0070.03711.00
5.2.150.0030.04711.05
5.2.140.0030.04311.13
5.2.130.0030.06711.17
5.2.120.0030.03711.15
5.2.110.0030.03710.95
5.2.100.0100.03711.20
5.2.90.0130.03311.13
5.2.80.0070.06011.11
5.2.70.0100.06311.11
5.2.60.0070.06311.05
5.2.50.0000.05311.07
5.2.40.0030.02711.09
5.2.30.0100.05010.98
5.2.20.0030.05710.99
5.2.10.0000.04710.81
5.2.00.0130.04010.81
5.1.60.0030.0579.98
5.1.50.0070.0309.93
5.1.40.0070.05010.03
5.1.30.0030.05710.17
5.1.20.0000.06310.39
5.1.10.0000.04710.03
5.1.00.0000.03010.05
5.0.50.0070.0478.48
5.0.40.0030.0438.34
5.0.30.0030.0508.30
5.0.20.0030.0178.26
5.0.10.0070.0438.16
5.0.00.0000.0378.15
4.4.90.0030.0137.69
4.4.80.0030.0277.69
4.4.70.0030.0337.69
4.4.60.0000.0377.69
4.4.50.0030.0337.69
4.4.40.0030.0477.69
4.4.30.0070.0237.69
4.4.20.0030.0337.69
4.4.10.0000.0277.69
4.4.00.0070.0307.69
4.3.110.0000.0307.69
4.3.100.0070.0237.69
4.3.90.0100.0177.69
4.3.80.0000.0407.69
4.3.70.0030.0137.69
4.3.60.0030.0137.69
4.3.50.0000.0177.69
4.3.40.0000.0237.69
4.3.30.0030.0137.69
4.3.20.0030.0137.69
4.3.10.0030.0237.69
4.3.00.0000.0337.69