3v4l.org

run code in 300+ PHP versions simultaneously
<?php function factorial($n) { if ($n <= 0) { return 1; } return $n * factorial($n); } echo factorial(8) . "\n";

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.0630.02073.24
8.3.50.0670.02372.75
8.3.40.0470.00745.24
8.3.30.0410.01043.75
8.2.180.0660.02372.50
8.2.170.0170.01744.55
8.1.280.0870.01373.85
7.4.00.0400.01870.76
7.3.120.0480.02470.32
7.3.110.0470.01470.38
7.3.100.0490.02070.36
7.3.90.0200.02770.60
7.3.80.0230.03470.43
7.3.70.0300.02070.04
7.3.60.0200.03070.18
7.3.50.0340.02470.40
7.3.40.0270.02370.08
7.3.30.0230.02970.36
7.3.20.0190.01078.74
7.3.10.0200.01378.53
7.3.00.0230.01078.25
7.2.250.0300.04070.06
7.2.240.0490.02370.63
7.2.230.0190.02970.26
7.2.220.0350.02170.27
7.2.210.0340.02070.47
7.2.200.0370.02070.30
7.2.190.0260.03370.50
7.2.180.0340.02470.35
7.2.170.0210.02870.49
7.2.160.0260.02370.40
7.2.150.0070.01878.78
7.2.140.0250.01478.70
7.2.130.0090.01878.65
7.2.120.0100.02478.55
7.2.110.0120.02478.91
7.2.100.0110.02278.88
7.2.90.0150.01678.86
7.2.80.0110.01878.83
7.2.70.0140.02778.78
7.2.60.0930.01478.65
7.2.50.2190.01678.79
7.2.40.0350.03078.64
7.2.30.0380.02378.94
7.2.20.0290.02978.39
7.2.10.0560.01178.93
7.2.00.2040.02180.12
7.1.330.0290.02977.87
7.1.320.0190.02377.70
7.1.310.0190.02977.73
7.1.300.0100.03677.90
7.1.290.0030.03777.87
7.1.280.0200.02077.73
7.1.270.0170.02377.72
7.1.260.0140.02977.82
7.1.250.0070.03477.48
7.1.240.0320.01677.77
7.1.230.0100.03477.70
7.1.220.0230.02677.77
7.1.210.0240.02877.47
7.1.200.0590.02977.60
7.1.190.0260.02377.76
7.1.180.0470.02577.80
7.1.170.0330.03677.57
7.1.160.0310.03577.57
7.1.150.0250.03977.78
7.1.140.0240.04077.87
7.1.130.0370.02977.70
7.1.120.0460.01577.80
7.1.110.0220.03777.47
7.1.100.4730.00743.95
7.1.90.0400.02377.90
7.1.80.0460.03477.68
7.1.70.0580.01045.26
7.1.60.0270.03278.47
7.1.50.0450.02678.39
7.1.40.0230.03577.63
7.1.30.0430.03177.45
7.1.20.0400.02477.75
7.1.10.0130.00511.51
7.1.00.0260.05480.98
7.0.330.0230.01777.70
7.0.320.0070.02577.39
7.0.310.1760.02077.56
7.0.300.0460.02677.50
7.0.290.0150.03377.16
7.0.280.0370.02177.44
7.0.270.0140.04577.33
7.0.260.0380.03577.44
7.0.250.0350.02377.50
7.0.240.0570.02777.18
7.0.230.0410.03177.57
7.0.220.0250.04377.50
7.0.210.1440.02477.52
7.0.200.4160.02975.12
7.0.190.0180.00011.51
7.0.180.0390.02977.48
7.0.170.0440.02477.21
7.0.160.0390.02777.45
7.0.150.0360.02977.39
7.0.140.0290.03377.29
7.0.130.0340.02777.50
7.0.120.0390.02977.48
7.0.110.0440.02477.29
7.0.100.0200.04077.30
7.0.90.0270.03877.44
7.0.80.0220.03877.41
7.0.70.0330.02477.24
7.0.60.0720.06076.48
7.0.50.0250.04642.46
7.0.40.0160.04916.77
7.0.30.0360.05316.92
7.0.20.0350.05516.79
7.0.10.0230.06216.73
7.0.00.0210.03716.96
5.6.400.0290.04579.22
5.6.390.0260.04578.86
5.6.380.0400.04379.25
5.6.370.0270.05078.93
5.6.360.0400.04778.98
5.6.350.0460.03979.05
5.6.340.0430.05379.02
5.6.330.0610.02879.22
5.6.320.0590.03978.73
5.6.310.0140.00711.51
5.6.300.0100.00711.51
5.6.290.0120.00911.51
5.6.280.0310.06282.17
5.6.270.0340.04679.01
5.6.260.0490.03579.03
5.6.250.0450.04878.85
5.6.240.0530.03878.98
5.6.230.0470.04778.85
5.6.220.0430.04378.86
5.6.210.0450.05581.99
5.6.200.0300.06280.93
5.6.190.0570.06382.12
5.6.180.0560.05382.20
5.6.170.0490.05681.90
5.6.160.0380.07581.87
5.6.150.0440.06280.90
5.6.140.0250.05347.17
5.6.130.0400.06180.80
5.6.120.0350.07382.41
5.6.110.0390.07182.41
5.6.100.0330.07382.22
5.6.90.0510.06082.26
5.6.80.0260.06881.91
5.6.70.0460.04678.57
5.6.60.0320.05479.07
5.6.50.0400.04778.82
5.6.40.0430.05079.04
5.6.30.0290.06178.85
5.6.20.0260.06778.77
5.6.10.0470.04078.68
5.6.00.0480.04478.72
5.5.380.0470.05078.79
5.5.370.0490.04678.71
5.5.360.0580.03678.86
5.5.350.0380.07382.04
5.5.340.0400.07080.69
5.5.330.0440.06981.93
5.5.320.0670.05481.91
5.5.310.0420.06581.90
5.5.300.0360.05880.59
5.5.290.0360.04980.88
5.5.280.0310.05482.24
5.5.270.0420.04982.07
5.5.260.0450.05882.26
5.5.250.0420.08082.07
5.5.240.0550.06281.92
5.5.230.0320.07078.87
5.5.220.0500.04178.81
5.5.210.0550.03978.68
5.5.200.0460.03878.43
5.5.190.0420.04978.89
5.5.180.0380.05178.63
5.5.170.0350.06179.00
5.5.160.0450.05578.69
5.5.150.0460.04278.82
5.5.140.0330.05478.90
5.5.130.0410.05878.87
5.5.120.0560.03178.44
5.5.110.0440.05178.77
5.5.100.0380.05178.54
5.5.90.0490.03778.52
5.5.80.0290.05478.80
5.5.70.0220.06578.70
5.5.60.0560.04878.60
5.5.50.0360.05378.65
5.5.40.0390.04878.85
5.5.30.0470.04378.91
5.5.20.0390.04678.58
5.5.10.0360.06078.74
5.5.00.0480.04279.03

preferences:
38.88 ms | 401 KiB | 5 Q