3v4l.org

run code in 300+ PHP versions simultaneously
<?php function factorial($number) { $factorial = 1; if ($number > 1) { $factorial *= $number; echo $factorial; $number--; factorial($number); } else { return $factorial; } } var_dump(factorial(5), factorial(0));

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.5.30.0120.01019.43
8.5.20.0080.00918.74
8.5.10.0050.00418.28
8.5.00.0130.01020.04
8.4.180.0130.00925.82
8.4.170.0130.00924.04
8.4.160.0130.01423.92
8.4.150.0080.00516.86
8.4.140.0140.01317.46
8.4.130.0150.00517.52
8.4.120.0110.00820.64
8.4.110.0110.00918.70
8.4.100.0150.00617.77
8.4.90.0140.00620.69
8.4.80.0060.00218.70
8.4.70.0140.00718.71
8.4.60.0130.00719.57
8.4.50.0110.01217.33
8.4.40.0170.00319.48
8.4.30.0160.00319.46
8.4.20.0170.00319.52
8.4.10.0070.00319.57
8.3.300.0130.01020.79
8.3.290.0130.00720.90
8.3.280.0140.00618.21
8.3.270.0120.01016.68
8.3.260.0130.00516.38
8.3.250.0090.00618.93
8.3.240.0120.00716.73
8.3.230.0120.00616.80
8.3.220.0100.00818.70
8.3.210.0110.01216.63
8.3.200.0060.00316.53
8.3.190.0030.00416.80
8.3.180.0050.00318.37
8.3.170.0040.01116.58
8.3.160.0180.00016.91
8.3.150.0100.00317.19
8.3.140.0060.00920.66
8.3.130.0030.00518.38
8.3.120.0140.00720.78
8.3.110.0040.00420.94
8.3.100.0100.00024.06
8.3.90.0080.00026.77
8.3.80.0090.00019.36
8.3.70.0060.00916.58
8.3.60.0180.00418.21
8.3.50.0110.00816.46
8.3.40.0120.00318.66
8.3.30.0040.01118.73
8.3.20.0000.00822.08
8.3.10.0080.00022.02
8.3.00.0040.00417.79
8.2.300.0060.00518.14
8.2.290.0120.00616.54
8.2.280.0140.00618.09
8.2.270.0130.00616.77
8.2.260.0000.00817.15
8.2.250.0060.00318.37
8.2.240.0050.00318.85
8.2.230.0080.00022.58
8.2.220.0030.00637.54
8.2.210.0100.00326.77
8.2.200.0040.00418.88
8.2.190.0180.00316.58
8.2.180.0080.00818.16
8.2.170.0170.00022.96
8.2.160.0000.01421.02
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00022.11
8.2.120.0040.00426.35
8.2.110.0070.00322.25
8.2.100.0040.00717.84
8.2.90.0040.00419.35
8.2.80.0040.00418.03
8.2.70.0030.00617.50
8.2.60.0030.00618.05
8.2.50.0070.00018.10
8.2.40.0060.00322.15
8.2.30.0000.00819.37
8.2.20.0020.00518.04
8.2.10.0000.00818.01
8.2.00.0040.00418.05
8.1.340.0120.00819.80
8.1.330.0130.00621.88
8.1.320.0110.00916.34
8.1.310.0030.00518.56
8.1.300.0030.00719.60
8.1.290.0090.00030.84
8.1.280.0130.01025.92
8.1.270.0040.00421.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.83
8.1.230.0090.00321.94
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0050.00517.22
8.1.190.0080.00018.89
8.1.180.0000.00718.10
8.1.170.0030.00618.33
8.1.160.0030.00318.99
8.1.150.0040.00418.78
8.1.140.0040.00419.36
8.1.130.0000.00718.75
8.1.120.0000.00717.31
8.1.110.0040.00417.39
8.1.100.0000.00817.30
8.1.90.0070.00017.31
8.1.80.0000.00717.44
8.1.70.0070.00017.41
8.1.60.0000.00817.55
8.1.50.0000.00817.48
8.1.40.0040.00417.45
8.1.30.0040.00417.67
8.1.20.0000.00917.60
8.1.10.0000.00817.41
8.1.00.0030.00617.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0000.00717.25
8.0.260.0030.00318.75
8.0.250.0030.00316.82
8.0.240.0030.00316.79
8.0.230.0040.00416.75
8.0.220.0030.00316.84
8.0.210.0060.00016.85
8.0.200.0060.00016.93
8.0.190.0040.00416.86
8.0.180.0040.00416.73
8.0.170.0070.00016.74
8.0.160.0000.00716.89
8.0.150.0070.00016.66
8.0.140.0000.00716.77
8.0.130.0000.00513.29
8.0.120.0030.00616.75
8.0.110.0070.00016.64
8.0.100.0070.00016.69
8.0.90.0040.00416.69
8.0.80.0070.01016.74
8.0.70.0030.00416.77
8.0.60.0040.00416.66
8.0.50.0030.00416.84
8.0.30.0130.00616.97
8.0.20.0100.01017.40
8.0.10.0000.00816.91
8.0.00.0140.00416.80
7.4.330.0000.00415.55
7.4.320.0070.00016.55
7.4.300.0000.00616.64
7.4.290.0030.00316.42
7.4.280.0050.00316.43
7.4.270.0070.00016.55
7.4.260.0060.00316.58
7.4.250.0070.00016.44
7.4.240.0040.00416.61
7.4.230.0030.00316.57
7.4.220.0030.01316.61
7.4.210.0100.00416.54
7.4.200.0030.00316.48
7.4.160.0060.01216.49
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0070.01816.52
7.4.120.0060.01516.53
7.4.110.0140.00316.49
7.4.100.0110.00616.64
7.4.90.0060.01216.38
7.4.80.0150.00319.39
7.4.70.0080.00816.56
7.4.60.0060.01216.47
7.4.50.0020.01016.54
7.4.40.0120.00316.33
7.4.30.0090.01316.39
7.4.00.0120.00714.92
7.3.330.0020.00213.31
7.3.320.0030.00313.36
7.3.310.0030.00316.38
7.3.300.0030.00316.21
7.3.290.0110.00516.39
7.3.280.0090.00716.36
7.3.270.0140.00417.40
7.3.260.0090.01016.39
7.3.250.0090.01116.31
7.3.240.0130.00416.33
7.3.230.0070.01116.40
7.3.210.0090.00916.28
7.3.200.0120.00316.58
7.3.190.0030.01316.63
7.3.180.0080.00816.36
7.3.170.0060.01016.70
7.3.160.0030.01216.40
7.3.120.0060.01014.82
7.3.110.0090.01015.06
7.3.100.0130.00614.81
7.3.90.0040.00814.53
7.3.80.0060.00314.85
7.3.70.0060.01014.89
7.3.60.0080.00414.69
7.3.50.0040.01114.78
7.3.40.0050.00414.82
7.3.30.0060.00614.77
7.3.20.0130.00016.80
7.3.10.0110.00416.35
7.3.00.0130.00316.84
7.2.330.0130.00716.66
7.2.320.0090.00916.62
7.2.310.0060.01316.77
7.2.300.0100.00716.38
7.2.290.0120.00416.29
7.2.250.0070.01315.23
7.2.240.0130.00314.79
7.2.230.0040.01415.24
7.2.220.0000.01015.32
7.2.210.0050.00515.14
7.2.200.0060.00314.89
7.2.190.0060.00715.05
7.2.180.0030.01015.03
7.2.170.0040.00814.96
7.2.60.0030.01216.83
7.1.330.0040.00715.61
7.1.320.0030.00615.85
7.1.310.0060.00615.71
7.1.300.0030.00716.04
7.1.290.0070.01016.04
7.1.280.0040.01115.82
7.1.270.0030.00915.79
7.1.260.0090.00015.72
7.1.200.0030.01015.79
7.1.80.0300.01315.96
7.1.70.0060.01615.33
7.1.60.0260.01833.00
7.1.50.0280.01533.12
7.1.41.2860.01032.65
7.1.31.1370.01832.74
7.1.20.8290.02432.68
7.1.10.7640.00714.71
7.1.00.5440.01014.93
7.0.200.0090.01014.96
7.0.190.0080.01514.82
7.0.180.0160.01114.43
7.0.170.9430.01114.41
7.0.161.0830.00914.63
7.0.150.6660.02014.44
7.0.140.7100.01314.46
7.0.130.4790.00714.68
7.0.120.5790.00814.67
7.0.110.4460.01714.69
7.0.100.5080.00914.52
7.0.90.5730.01114.49
7.0.80.6860.01514.70
7.0.70.5290.01214.54
7.0.60.5280.01214.29
7.0.50.5290.01314.51
7.0.40.4350.01314.66
7.0.30.5390.01214.49
7.0.20.5770.01514.84
7.0.10.5900.00914.56
7.0.00.5180.01114.56

preferences:
48.44 ms | 1569 KiB | 5 Q