3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public function &__call($foo, $bar) { static $cnt = 0; $cnt++; return $cnt; } } $f = new foo(); $a = $f->bar(); var_dump($a); $a =& $f->bar(); var_dump($a); $a++; $b = $f->bar(); var_dump($b);

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.60.0060.00917.01
7.2.00.0000.01419.20
7.1.200.0030.00815.69
7.1.100.0030.01018.14
7.1.70.0060.00317.02
7.1.60.0060.01919.70
7.1.50.0090.01516.86
7.1.00.0070.07322.32
7.0.200.0000.00816.75
7.0.140.0070.07022.00
7.0.60.0000.04319.90
7.0.50.0030.04017.97
7.0.40.0030.04320.41
7.0.30.0230.03320.07
7.0.20.0300.07720.23
7.0.10.0030.04320.07
7.0.00.0030.04020.02
5.6.280.0030.07021.13
5.6.210.0170.07720.55
5.6.200.0130.03318.29
5.6.190.0030.04720.64
5.6.180.0230.04020.47
5.6.170.0470.03720.56
5.6.160.0130.04020.57
5.6.150.0070.05018.19
5.6.140.0100.03318.17
5.6.130.0030.04018.17
5.6.120.0100.07720.90
5.6.110.0070.03721.08
5.6.100.0130.08321.01
5.6.90.0130.06321.12
5.6.80.0170.08020.41
5.5.350.0130.06720.39
5.5.340.0030.07718.04
5.5.330.0030.07320.57
5.5.320.0300.04720.36
5.5.310.0070.05020.28
5.5.300.0030.03718.05
5.5.290.0170.07317.98
5.5.280.0030.04020.90
5.5.270.0070.04320.87
5.5.260.0070.06020.88
5.5.250.0070.06720.71
5.5.240.2800.03720.07
5.4.450.0200.04734.79
5.4.440.0370.04733.05
5.4.430.0200.04332.19
5.4.420.0200.04732.19
5.4.410.0570.03732.19
5.4.400.0270.03732.19
5.4.390.0270.03332.19
5.4.380.0900.04718.73
5.4.370.0870.05318.75
5.4.360.0930.06018.46
5.4.350.0830.06318.53
5.4.340.0800.05718.74
5.4.320.0070.04512.50
5.4.310.0050.04012.50
5.4.300.0040.04512.50
5.4.290.0050.03912.50
5.4.280.0090.04012.39
5.4.270.0100.04512.40
5.4.260.0120.04612.40
5.4.250.0100.04812.39
5.4.240.0090.04812.40
5.4.230.0070.05212.38
5.4.220.0070.04212.39
5.4.210.0170.03212.39
5.4.200.0110.03812.39
5.4.190.0120.03912.38
5.4.180.0040.04212.38
5.4.170.0040.04012.40
5.4.160.0100.03512.39
5.4.150.0080.04112.39
5.4.140.0130.04712.07
5.4.130.0080.04712.05
5.4.120.0080.05012.02
5.4.110.0060.04112.01
5.4.100.0130.03712.01
5.4.90.0090.03912.02
5.4.80.0080.04712.01
5.4.70.0090.04712.01
5.4.60.0090.04312.00
5.4.50.0060.04212.01
5.4.40.0050.03912.00
5.4.30.0040.03712.00
5.4.20.0090.04911.99
5.4.10.0080.05612.00
5.4.00.0080.04111.48
5.3.290.0070.04412.80
5.3.280.0130.04512.70
5.3.270.0090.04912.72
5.3.260.0050.04312.72
5.3.250.0020.04412.72
5.3.240.0070.04212.71
5.3.230.0080.03912.71
5.3.220.0080.04212.68
5.3.210.0050.04812.68
5.3.200.0070.04912.68
5.3.190.0070.04812.68
5.3.180.0050.04112.68
5.3.170.0070.04112.67
5.3.160.0070.04012.67
5.3.150.0120.04512.67
5.3.140.0060.04512.66
5.3.130.0070.04112.66
5.3.120.0040.04312.66
5.3.110.0080.04312.66
5.3.100.0070.03912.11
5.3.90.0070.04312.09
5.3.80.0070.04112.09
5.3.70.0080.04012.09
5.3.60.0060.04612.07
5.3.50.0040.04512.02
5.3.40.0080.04212.03
5.3.30.0100.03811.98
5.3.20.0070.03611.76
5.3.10.0070.03811.73
5.3.00.0100.04211.72
5.2.170.0070.0339.22
5.2.160.0060.0389.22
5.2.150.0050.0359.22
5.2.140.0090.0319.21
5.2.130.0030.0329.18
5.2.120.0070.0319.18
5.2.110.0060.0339.19
5.2.100.0070.0319.18
5.2.90.0060.0309.18
5.2.80.0060.0349.17
5.2.70.0040.0379.17
5.2.60.0080.0339.13
5.2.50.0040.0399.09
5.2.40.0070.0369.07
5.2.30.0060.0369.04
5.2.20.0090.0369.04
5.2.10.0060.0368.94
5.2.00.0050.0328.80
5.1.60.0050.0248.09
5.1.50.0060.0268.09
5.1.40.0080.0338.07
5.1.30.0060.0378.42
5.1.20.0060.0298.44
5.1.10.0060.0298.16
5.1.00.0060.0378.16
5.0.50.0030.0286.64
5.0.40.0110.0226.49
5.0.30.0050.0436.32
5.0.20.0070.0436.28
5.0.10.0050.0356.25
5.0.00.0080.0426.24
4.4.90.0030.0224.78
4.4.80.0050.0214.75
4.4.70.0060.0164.75
4.4.60.0040.0204.75
4.4.50.0050.0204.77
4.4.40.0060.0344.71
4.4.30.0050.0224.76
4.4.20.0050.0184.85
4.4.10.0020.0234.85
4.4.00.0040.0324.76
4.3.110.0050.0244.67
4.3.100.0030.0184.66
4.3.90.0020.0184.63
4.3.80.0050.0254.58
4.3.70.0040.0244.63
4.3.60.0070.0194.63
4.3.50.0050.0234.63
4.3.40.0070.0324.54
4.3.30.0050.0213.30
4.3.20.0040.0223.28
4.3.10.0020.0203.23
4.3.00.0000.02032.09