3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo factorial(3); function factorial(int $extent, int $currentValue = 1, int $step = 1): int { $currentValue *= $step; if ($step < $extent) { $step++; return factorial($extent, $step); } return $currentValue; }

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.0780.01372.50
8.3.50.0620.03172.00
8.3.40.0350.01044.91
8.3.30.0260.02344.71
8.3.20.0160.00646.41
8.3.10.0240.00048.03
8.3.00.0220.00643.80
8.2.180.0850.02372.81
8.2.170.0460.00744.93
8.2.160.0370.00346.35
8.2.150.0190.00345.00
8.2.140.0090.00947.93
8.2.130.0220.00646.89
8.2.120.0080.00450.35
8.2.110.0170.00348.43
8.2.100.0390.00643.97
8.2.90.0140.00745.23
8.2.80.0150.00643.91
8.2.70.0110.01143.50
8.2.60.0140.00743.91
8.2.50.0170.00443.78
8.2.40.0110.01146.59
8.2.30.0100.01045.77
8.2.20.0160.00943.96
8.2.10.0110.01543.91
8.2.00.0130.00743.87
8.1.280.0710.02472.00
8.1.270.0190.00348.80
8.1.260.0160.00349.17
8.1.250.0180.00646.38
8.1.240.0070.01051.25
8.1.230.0350.00744.68
8.1.220.0140.00743.51
8.1.210.0210.00343.23
8.1.200.0170.00743.23
8.1.190.0160.00642.98
8.1.180.0100.01043.40
8.1.170.0070.01444.46
8.1.160.0110.01144.96
8.1.150.0090.00945.77
8.1.140.0240.00045.48
8.1.130.0100.01043.39
8.1.120.0090.01243.35
8.1.110.0100.01043.48
8.1.100.0170.00343.50
8.1.90.0140.01143.47
8.1.80.0070.01743.43
8.1.70.0090.01243.42
8.1.60.0140.01443.59
8.1.50.0110.01143.61
8.1.40.0180.01143.61
8.1.30.0210.01043.46
8.1.20.0160.01043.60
8.1.10.0260.01973.12
8.1.00.0230.01373.02
8.0.300.0280.01072.58
8.0.290.0200.01372.38
8.0.280.0320.01373.88
8.0.270.0400.00372.77
8.0.260.0240.00772.35
8.0.250.0230.01072.38
8.0.240.0410.01472.25
8.0.230.0260.01672.36
8.0.220.0230.01072.39
8.0.210.0240.01772.32
8.0.200.0310.00372.25
8.0.190.0340.01372.41
8.0.180.0340.01372.34
8.0.170.0350.01372.30
8.0.160.0200.02772.38
8.0.150.0270.01072.36
8.0.140.0190.01672.34
8.0.130.0600.020121.74
8.0.120.0240.01472.34
8.0.110.0230.01372.27
8.0.100.0070.02872.19
8.0.90.0230.01372.37
8.0.80.0710.02872.43
8.0.70.0250.01272.21
8.0.60.0230.01372.47
8.0.50.0170.02172.18
8.0.30.0460.03272.50
8.0.20.0660.02872.57
8.0.10.0160.02372.51
8.0.00.0530.04372.29
7.4.330.0130.01671.80
7.4.320.0220.01972.02
7.4.300.0210.01472.07
7.4.290.0480.00372.08
7.4.280.0280.01672.02
7.4.270.0300.01371.94
7.4.260.0250.01971.99
7.4.250.0300.01372.05
7.4.240.0200.01772.10
7.4.230.0220.01872.11
7.4.220.0670.04872.08
7.4.210.0640.03972.07
7.4.200.0290.01072.01
7.4.160.0510.03372.07
7.4.150.0820.04472.01
7.4.140.0700.02971.98
7.4.130.0470.05672.00
7.4.120.0530.03972.05
7.4.110.0630.03072.02
7.4.100.0560.04671.98
7.4.90.0530.03772.15
7.4.80.0470.05072.08
7.4.70.0640.02771.93
7.4.60.0600.05072.03
7.4.50.0300.03072.11
7.4.40.0530.04771.97
7.4.30.0440.04372.03
7.3.330.0660.035121.79
7.3.320.0330.030121.86
7.3.310.0280.01071.84
7.3.300.0140.02571.93
7.3.290.0500.04271.86
7.3.280.0680.04371.84
7.3.270.0640.05771.95
7.3.260.0700.04972.09
7.3.250.0730.03772.01
7.3.240.0550.04071.91
7.3.230.0860.04171.99
7.3.210.0660.06072.09
7.3.200.0400.05771.91
7.3.190.0630.03072.16
7.3.180.0770.01971.89
7.3.170.0800.04571.79
7.3.160.0590.03672.13
7.2.330.0540.04572.19
7.2.320.0530.04672.17
7.2.310.0660.02972.18
7.2.300.0520.04372.25
7.2.290.0530.04772.23
7.2.92.5040.02054.57
7.2.82.4160.03063.65
7.1.212.3000.02650.10
7.1.202.4050.02766.21
7.0.312.3770.03757.05

preferences:
90.72 ms | 400 KiB | 5 Q