3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php const A = 1; const B = A * 2; class NuovoRisultato { const C = B + 1; const CALCOLO = A / self::C; const OUTPUT = 'Valore di C pari a '.self::C; public function addizione($totale = A + self::C) { return $totale; } } echo (new NuovoRisultato)->addizione()."\n"; echo NuovoRisultato::OUTPUT; ?>

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.3.0rc40.0120.00498.97
7.3.0rc30.0290.00316.48
7.2.00.0000.01019.27
7.1.100.0090.00618.11
7.1.70.0040.00417.21
7.1.60.0040.02119.29
7.1.50.0100.01016.80
7.1.00.0030.07322.28
7.0.200.0030.01016.70
7.0.140.0030.08022.07
7.0.60.0070.06319.97
7.0.50.0070.04717.91
7.0.40.0070.06320.26
7.0.30.0270.08020.26
7.0.20.0300.07320.24
7.0.10.0100.08020.06
7.0.00.0130.06720.24
5.6.280.0070.07021.05
5.6.210.0130.07720.77
5.6.200.0070.08018.16
5.6.190.0100.05720.47
5.6.180.0270.03720.77
5.6.170.0230.04320.46
5.6.160.0130.07720.48
5.6.150.0070.06318.23
5.6.140.0030.08318.17
5.6.130.0070.06018.23
5.6.120.0000.06720.98
5.6.110.0100.07721.04
5.6.100.0070.05320.97
5.6.90.0070.05020.98
5.6.80.0170.07320.44
5.5.350.0270.07320.31
5.5.340.0100.08018.09
5.5.330.0170.04020.23
5.5.320.0400.06720.30
5.5.310.0170.04720.27
5.5.300.0000.04317.95
5.5.290.0100.07718.02
5.5.280.0100.05720.66
5.5.270.0170.05720.74
5.5.260.0000.07720.87
5.5.250.0030.04720.46
5.5.240.0070.07320.35
5.4.450.0800.05319.47
5.4.440.0630.05319.47
5.4.430.0170.04719.21
5.4.420.0200.05019.63
5.4.410.0070.05718.91
5.4.400.0130.07018.79
5.4.390.0070.05718.79
5.4.380.0200.06718.51
5.4.370.0070.05718.66
5.4.360.0030.05318.57
5.4.350.0060.03412.02
5.4.340.0080.03512.01
5.4.320.0060.04112.50
5.4.310.0100.04112.50
5.4.300.0060.04612.49
5.4.290.0050.04112.49
5.4.280.0110.05512.36
5.4.270.0160.09112.36
5.4.260.0080.04312.36
5.4.250.0120.03912.37
5.4.240.0070.04912.36
5.4.230.0090.04112.36
5.4.220.0100.04212.36
5.4.210.0100.04612.35
5.4.200.0130.03812.35
5.4.190.0060.04612.35
5.4.180.0110.04512.35
5.4.170.0130.06012.36
5.4.160.0050.06812.35
5.4.150.0170.05812.35
5.4.140.0190.06112.04
5.4.130.0110.06912.02
5.4.120.0120.06311.99
5.4.110.0180.05611.99
5.4.100.0160.05511.98
5.4.90.0110.06711.98
5.4.80.0130.06511.98
5.4.70.0110.06511.98
5.4.60.0140.06011.98
5.4.50.0120.06311.98
5.4.40.0140.05711.97
5.4.30.0170.05911.96
5.4.20.0150.05811.96
5.4.10.0140.06211.97
5.4.00.0110.05411.45
5.3.290.0070.04412.80
5.3.280.0080.05912.71
5.3.270.0100.06012.72
5.3.260.0110.05812.71
5.3.250.0140.05012.72
5.3.240.0080.06012.72
5.3.230.0070.06012.71
5.3.220.0080.06212.68
5.3.210.0100.06212.68
5.3.200.0120.05712.68
5.3.190.0100.05612.68
5.3.180.0060.06112.67
5.3.170.0080.06012.67
5.3.160.0110.05512.68
5.3.150.0080.05912.67
5.3.140.0110.06012.66
5.3.130.0120.06012.66
5.3.120.0150.05812.66
5.3.110.0130.06212.65
5.3.100.0130.05812.12
5.3.90.0140.05912.08
5.3.80.0090.06012.08
5.3.70.0120.05712.08
5.3.60.0080.06112.06
5.3.50.0110.05712.00
5.3.40.0090.05412.00
5.3.30.0080.05611.94
5.3.20.0110.05611.70
5.3.10.0070.06111.67
5.3.00.0100.05611.66
5.2.170.0060.0509.15
5.2.160.0060.0489.15
5.2.150.0100.0479.15
5.2.140.0060.0529.15
5.2.130.0120.0449.11
5.2.120.0060.0499.11
5.2.110.0100.0479.12
5.2.100.0100.0479.11
5.2.90.0050.0539.11
5.2.80.0110.0509.11
5.2.70.0110.0479.11
5.2.60.0100.0519.05
5.2.50.0130.0439.03
5.2.40.0060.0419.00
5.2.30.0090.0458.98
5.2.20.0070.0418.97
5.2.10.0090.0398.91
5.2.00.0070.0428.76
5.1.60.0090.0348.04
5.1.50.0060.0368.04
5.1.40.0060.0368.03
5.1.30.0060.0408.38
5.1.20.0060.0418.40
5.1.10.0050.0398.12
5.1.00.0100.0368.12
5.0.50.0060.0306.59
5.0.40.0070.0296.46
5.0.30.0050.0456.27
5.0.20.0050.0286.24
5.0.10.0070.0266.21
5.0.00.0040.0416.20
4.4.90.0050.0274.78
4.4.80.0090.0284.75
4.4.70.0020.0244.75
4.4.60.0070.0194.75
4.4.50.0070.0214.77
4.4.40.0050.0344.71
4.4.30.0020.0244.75
4.4.20.0040.0234.85
4.4.10.0040.0234.85
4.4.00.0040.0344.76
4.3.110.0050.0224.67
4.3.100.0020.0244.67
4.3.90.0030.0224.63
4.3.80.0120.0924.58
4.3.70.0040.0224.63
4.3.60.0040.0204.62
4.3.50.0080.0184.62
4.3.40.0050.0324.54
4.3.30.0040.0213.27
4.3.20.0030.0233.25
4.3.10.0050.0203.22
4.3.00.0100.0237.05