3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function bcfact($n){ $factorial=$n; while (--$n>1) { echo $n. PHP_EOL; $factorial=bcmul($factorial,$n); } return $factorial; } echo PHP_EOL; echo PHP_EOL; echo PHP_EOL; print bcfact(5.5);
based on NqSqQ

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.80.0120.00316.34
7.2.60.0060.00616.96
7.2.00.0130.00619.29
7.1.200.0070.00415.98
7.1.100.0030.00918.26
7.1.70.0000.00717.11
7.1.60.0120.00919.50
7.1.50.0040.01516.91
7.1.00.0000.08022.28
7.0.200.0030.00316.90
7.0.60.0100.05319.96
7.0.50.0070.06017.85
7.0.40.0130.07720.24
7.0.30.0230.04720.18
7.0.20.0170.04720.23
7.0.10.0100.08020.19
7.0.00.0070.07720.25
5.6.280.0070.03020.89
5.6.210.0030.08320.73
5.6.200.0030.07018.21
5.6.190.0100.04020.58
5.6.180.0400.05720.33
5.6.170.0170.04320.46
5.6.160.0030.06020.46
5.6.150.0100.08018.25
5.6.140.0070.05018.18
5.6.130.0100.05718.27
5.6.120.0100.08021.14
5.6.110.0070.03720.89
5.6.100.0070.09020.89
5.6.90.0200.07320.98
5.6.80.0170.06720.57
5.5.350.0230.08320.38
5.5.340.0100.06318.08
5.5.330.0070.05320.29
5.5.320.0270.03720.35
5.5.310.0200.05720.31
5.5.300.0000.06017.92
5.5.290.0270.03317.98
5.5.280.0070.04020.85
5.5.270.0070.05720.96
5.5.260.0030.06320.87
5.5.250.0070.08020.58
5.5.240.0030.07020.26
5.4.450.0770.04719.62
5.4.440.0670.05719.30
5.4.430.0670.06319.33
5.4.420.0730.06319.35
5.4.410.0670.05019.36
5.4.400.0630.06019.06
5.4.390.0770.06719.15
5.4.380.0870.07019.01
5.4.370.0870.06719.16
5.4.360.0630.05319.38
5.4.350.0730.04319.13
5.4.340.0700.05719.21
5.4.320.0630.05719.32
5.4.310.0800.06319.02
5.4.300.0700.05318.88
5.4.290.0670.04719.06
5.4.280.0600.05319.37
5.4.270.0700.04719.23
5.4.260.0670.05018.87
5.4.250.0630.05019.29
5.4.240.0730.04719.22
5.4.230.0730.07719.25
5.4.220.0670.05719.28
5.4.210.0670.07019.00
5.4.200.0570.05719.02
5.4.190.0830.06019.37
5.4.180.0600.05719.11
5.4.170.0700.05019.21
5.4.160.0670.05319.23
5.4.150.0630.06319.28
5.4.140.0630.05316.35
5.4.130.0770.07016.37
5.4.120.0770.04316.35
5.4.110.0570.06316.67
5.4.100.0630.05016.57
5.4.90.0700.04316.67
5.4.80.0630.05016.66
5.4.70.0030.05716.59
5.4.60.0370.05716.51
5.4.50.0270.06716.43
5.4.40.0170.03716.22
5.4.30.0130.06716.46
5.4.20.0030.04316.37
5.4.10.0270.07716.48
5.3.290.4270.04014.88
5.3.280.3730.04314.73
5.3.270.3600.04014.74
5.3.260.2530.03714.57
5.3.250.0070.06314.51
5.3.240.2730.03714.53
5.3.230.0230.04014.74
5.3.220.3930.04014.64
5.3.210.0300.06714.73
5.3.200.0270.05714.53
5.3.190.3330.03714.53
5.3.180.0370.07014.57