3v4l.org

run code in 300+ PHP versions simultaneously
<?php //factorial.php $n = $argv[1]; $factorial = array_product(range(1, $n)); echo $factorial . "\n"; //direct output printf("%g\n", $factorial); //force scientific notation

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.0040.01118.55
8.3.50.0050.01422.04
8.3.40.0090.00618.87
8.3.30.0070.01019.23
8.3.20.0070.00020.34
8.3.10.0090.00020.52
8.3.00.0100.00017.63
8.2.180.0110.00716.63
8.2.170.0160.00322.96
8.2.160.0070.00720.57
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00022.09
8.2.110.0000.00922.25
8.2.100.0120.00018.03
8.2.90.0040.00419.35
8.2.80.0050.00317.97
8.2.70.0030.00617.63
8.2.60.0100.00017.93
8.2.50.0000.00818.07
8.2.40.0040.00418.31
8.2.30.0030.00519.49
8.2.20.0050.00217.81
8.2.10.0000.00818.03
8.2.00.0030.00617.79
8.1.280.0070.01025.92
8.1.270.0050.00322.13
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0090.00023.97
8.1.230.0000.01118.98
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0000.00917.25
8.1.190.0050.00317.22
8.1.180.0000.00718.10
8.1.170.0080.00018.29
8.1.160.0000.00721.82
8.1.150.0040.00418.78
8.1.140.0000.00717.30
8.1.130.0080.00017.73
8.1.120.0070.00017.45
8.1.110.0070.00017.40
8.1.100.0070.00017.38
8.1.90.0030.00517.28
8.1.80.0070.00017.40
8.1.70.0000.00717.34
8.1.60.0030.00617.40
8.1.50.0050.00317.45
8.1.40.0000.00817.43
8.1.30.0040.00417.61
8.1.20.0050.00217.53
8.1.10.0030.00617.47
8.1.00.0060.00317.50
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0030.00318.45
8.0.270.0000.00717.25
8.0.260.0030.00317.29
8.0.250.0000.00717.00
8.0.240.0070.00017.05
8.0.230.0000.00716.98
8.0.220.0000.00716.96
8.0.210.0050.00316.88
8.0.200.0000.00716.88
8.0.190.0000.01116.99
8.0.180.0080.00017.00
8.0.170.0030.00616.93
8.0.160.0030.00317.02
8.0.150.0030.00516.91
8.0.140.0000.00716.92
8.0.130.0030.00313.36
8.0.120.0020.00516.93
8.0.110.0080.00016.82
8.0.100.0040.00416.93
8.0.90.0000.00716.95
8.0.80.0150.00016.92
8.0.70.0040.00416.81
8.0.60.0040.00416.92
8.0.50.0000.00816.78
8.0.30.0100.01016.99
8.0.20.0110.01117.40
8.0.10.0000.00717.01
8.0.00.0100.00716.84
7.4.330.0030.00315.00
7.4.320.0030.00316.56
7.4.300.0060.00016.36
7.4.290.0000.00716.54
7.4.280.0000.00816.41
7.4.270.0040.00416.50
7.4.260.0070.00016.57
7.4.250.0070.00016.42
7.4.240.0030.00416.48
7.4.230.0030.00316.33
7.4.220.0060.01216.43
7.4.210.0110.00316.65
7.4.200.0000.00716.41
7.4.160.0090.00616.43
7.4.150.0160.00317.40
7.4.140.0090.00917.86
7.4.130.0080.00816.39
7.4.120.0130.00416.63
7.4.110.0100.00716.48
7.4.100.0100.00716.57
7.4.90.0160.00016.51
7.4.80.0070.01019.39
7.4.70.0060.01216.59
7.4.60.0120.00316.57
7.4.50.0060.00316.61
7.4.40.0160.00316.43
7.4.30.0060.00916.23
7.4.00.0070.00715.05
7.3.330.0030.00313.09
7.3.320.0000.00613.21
7.3.310.0060.00016.41
7.3.300.0000.00716.24
7.3.290.0110.00416.48
7.3.280.0080.00816.34
7.3.270.0030.01717.40
7.3.260.0150.00716.35
7.3.250.0080.01216.44
7.3.240.0150.00616.44
7.3.230.0060.00916.60
7.3.210.0170.02416.44
7.3.200.0080.01119.39
7.3.190.0310.02516.45
7.3.180.0000.01716.52
7.3.170.0100.00716.36
7.3.160.0060.00916.36
7.2.330.0080.00816.71
7.2.320.0090.00916.43
7.2.310.0040.01516.73
7.2.300.0090.00916.46
7.2.290.0080.00816.76
7.2.60.0070.00716.80
7.1.200.0100.00315.87
7.1.100.0090.01315.91
7.1.70.0000.00916.84
7.1.60.0090.01519.61
7.1.50.0030.01417.04
7.1.00.0070.07322.30
7.0.200.0000.00816.80
7.0.140.0100.06722.07
7.0.60.0170.07319.95
7.0.50.0070.06317.80
7.0.40.0130.04320.26
7.0.30.0230.05020.18
7.0.20.0230.04020.00
7.0.10.0100.03720.09
7.0.00.0000.06720.33
5.6.280.0070.07021.10
5.6.210.0130.07720.56
5.6.200.0100.07718.15
5.6.190.0100.07020.35
5.6.180.0200.03320.68
5.6.170.0370.08020.33
5.6.160.0070.06020.48
5.6.150.0070.08018.19
5.6.140.0100.07718.18
5.6.130.0000.05718.12
5.6.120.0100.06020.99
5.6.110.0100.06721.10
5.6.100.0100.06721.00
5.6.90.0070.07721.09
5.6.80.0100.04020.52
5.6.70.3130.03320.50
5.5.350.0330.05720.43
5.5.340.0030.04317.97
5.5.330.0100.07320.40
5.5.320.0300.08020.28
5.5.310.0100.04320.19
5.5.300.0070.08017.98
5.5.290.0100.08717.92
5.5.280.0070.04720.87
5.5.270.0130.07320.73
5.5.260.0200.07020.88
5.5.250.0070.07720.68
5.5.240.0230.06720.18
5.4.450.0270.05019.11
5.4.440.0330.04719.42
5.4.430.0500.05019.48
5.4.420.0330.03019.23
5.4.410.0330.04019.45
5.4.400.0270.04018.93
5.4.390.0330.03719.25
5.4.380.0200.06018.58
5.4.370.0200.06318.77
5.4.360.0270.07018.46
5.4.350.0430.06018.68
5.4.340.0330.04318.46
5.4.320.0080.03512.45
5.4.310.0050.04012.45
5.4.300.0090.03412.45
5.4.290.0060.04412.45
5.4.280.0100.03312.34
5.4.270.0050.04012.35
5.4.260.0070.03912.34
5.4.250.0070.04012.34
5.4.240.0060.03612.34
5.4.230.0050.03912.34
5.4.220.0080.04212.34
5.4.210.0070.04512.34
5.4.200.0100.03212.34
5.4.190.0050.03812.34
5.4.180.0110.03712.34
5.4.170.0050.03612.35
5.4.160.0110.03312.34
5.4.150.0060.04012.34
5.4.140.0090.03812.02
5.4.130.0050.03612.01
5.4.120.0050.03611.97
5.4.110.0050.03511.96
5.4.100.0040.03611.96
5.4.90.0040.04711.96
5.4.80.0050.03911.97
5.4.70.0050.03511.96
5.4.60.0030.03811.96
5.4.50.0100.03411.96
5.4.40.0060.04211.95
5.4.30.0050.03911.95
5.4.20.0080.04011.94
5.4.10.0060.03711.95
5.4.00.0080.03411.44
5.3.290.0080.03912.80
5.3.280.0080.03712.71
5.3.270.0090.03912.72
5.3.260.0070.04212.72
5.3.250.0070.03812.72
5.3.240.0040.04012.72
5.3.230.0050.04312.70
5.3.220.0060.04012.68
5.3.210.0090.03712.68
5.3.200.0070.03612.68
5.3.190.0060.03912.68
5.3.180.0060.03812.68
5.3.170.0130.04312.67
5.3.160.0080.04012.68
5.3.150.0080.03912.67
5.3.140.0090.03612.66
5.3.130.0070.04112.66
5.3.120.0080.04512.66
5.3.110.0100.03812.66
5.3.100.0070.03612.12
5.3.90.0120.03512.08
5.3.80.0050.03712.08
5.3.70.0110.04512.08
5.3.60.0070.03512.06
5.3.50.0060.04212.00
5.3.40.0090.03312.00
5.3.30.0080.04311.95
5.3.20.0040.03611.73
5.3.10.0050.04611.70
5.3.00.0060.04311.68
5.2.170.0040.0349.18
5.2.160.0060.0369.18
5.2.150.0030.0349.18
5.2.140.0020.0339.18
5.2.130.0090.0319.14
5.2.120.0050.0309.14
5.2.110.0050.0289.14
5.2.100.0110.0239.14
5.2.90.0050.0319.14
5.2.80.0040.0329.14
5.2.70.0070.0389.14
5.2.60.0040.0309.09
5.2.50.0040.0299.06
5.2.40.0030.0309.04
5.2.30.0020.0329.01
5.2.20.0030.0369.00
5.2.10.0030.0328.94
5.2.00.0050.0288.79
5.1.60.0060.0278.08
5.1.50.0060.0278.07
5.1.40.0030.0288.05
5.1.30.0040.0308.41
5.1.20.0040.0328.43
5.1.10.0040.0278.15
5.1.00.0080.0228.15
5.0.50.0040.0246.62
5.0.40.0050.0226.48
5.0.30.0030.0376.29
5.0.20.0050.0286.26
5.0.10.0050.0216.24
5.0.00.0060.0356.23
4.4.90.0030.0184.78
4.4.80.0070.0244.75
4.4.70.0040.0164.76
4.4.60.0030.0174.76
4.4.50.0030.0174.77
4.4.40.0030.0274.71
4.4.30.0040.0164.76
4.4.20.0040.0184.85
4.4.10.0040.0254.85
4.4.00.0060.0284.76
4.3.110.0040.0264.67
4.3.100.0040.0194.66
4.3.90.0000.0194.64
4.3.80.0050.0264.59
4.3.70.0050.0184.63
4.3.60.0050.0234.63
4.3.50.0030.0164.62
4.3.40.0040.0234.54
4.3.30.0010.0213.28
4.3.20.0040.0183.26
4.3.10.0000.0213.22
4.3.00.0030.01716.72

preferences:
46.93 ms | 401 KiB | 5 Q