3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Dog { private $_name; protected $_color; public function __construct($name, $color) { $this->_name = $name; $this->_color = $color; } public function greet($greeting) { return function() use ($greeting) { echo "$greeting, I am a {$this->_color} dog named {$this->_name}."; }; } } $dog = new Dog("Rover","red"); $dog->greet("Hello")();
based on K1pnI

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.0070.00717.11
7.2.00.0000.01419.29
7.1.200.0140.00015.80
7.1.100.0060.00618.25
7.1.70.0030.00617.11
7.1.60.0040.01419.40
7.1.50.0070.01717.00
7.1.00.0070.07322.40
7.0.200.0000.00716.81
7.0.140.0070.07022.08
7.0.60.0100.08019.82
7.0.50.0070.08317.89
7.0.40.0030.08720.11
7.0.30.0270.06020.07
7.0.20.0200.04020.19
7.0.10.0100.05320.22
7.0.00.0030.05020.13
5.6.280.0070.07021.15
5.6.210.0100.08320.67
5.6.200.0070.03718.13
5.6.190.0070.07720.41
5.6.180.0300.04720.39
5.6.170.0300.09020.55
5.6.160.0030.04320.44
5.6.150.0170.07318.27
5.6.140.0070.04718.27
5.6.130.0170.05718.18
5.6.120.0030.08721.02
5.6.110.0100.08721.13
5.6.100.0100.08021.04
5.6.90.0070.03721.05
5.6.80.0130.07720.42
5.5.350.0030.07720.48
5.5.340.0070.07317.96
5.5.330.0130.03720.40
5.5.320.0000.04720.41
5.5.310.0170.04020.36
5.5.300.0130.07718.09
5.5.290.0070.08018.05
5.5.280.0070.05320.83
5.5.270.0070.04720.88
5.5.260.0030.09020.77
5.5.250.0000.04320.73
5.5.240.0170.03720.20
5.4.450.0630.05019.31
5.4.440.0270.04319.30
5.4.430.0330.04319.54
5.4.420.0230.04719.54
5.4.410.0230.04019.39
5.4.400.0200.03719.20
5.4.390.0170.04719.00
5.4.380.0200.04718.49
5.4.370.0170.05018.69
5.4.360.0330.03718.78
5.4.350.0130.05718.63
5.4.340.0130.05318.66
5.4.320.0060.03812.53
5.4.310.0070.03712.52
5.4.300.0130.06012.53
5.4.290.0090.03512.52
5.4.280.0040.03712.41
5.4.270.0050.03812.42
5.4.260.0050.03912.42
5.4.250.0070.03712.41
5.4.240.0060.03712.42
5.4.230.0060.03812.41
5.4.220.0070.03412.41
5.4.210.0050.03612.41
5.4.200.0130.04612.41
5.4.190.0070.03712.40
5.4.180.0110.04812.41
5.4.170.0090.04012.41
5.4.160.0040.03912.41
5.4.150.0080.03412.41
5.4.140.0080.03512.10
5.4.130.0060.03712.07
5.4.120.0110.04612.05
5.4.110.0040.04112.04
5.4.100.0060.03612.04
5.4.90.0080.03512.04
5.4.80.0080.04112.04
5.4.70.0050.04012.04
5.4.60.0050.05312.04
5.4.50.0080.04712.03
5.4.40.0040.03712.02
5.4.30.0050.03612.02
5.4.20.0100.03212.01
5.4.10.0070.03512.02
5.4.00.0060.05311.51
5.3.290.0110.04612.80
5.3.280.0100.04812.71
5.3.270.0080.05312.72
5.3.260.0090.05112.72
5.3.250.0050.03912.72
5.3.240.0080.03712.72
5.3.230.0140.03412.71
5.3.220.0090.03412.68
5.3.210.0070.03912.68
5.3.200.0060.03712.68
5.3.190.0060.03812.68
5.3.180.0050.03912.67
5.3.170.0050.03912.67
5.3.160.0030.04512.67
5.3.150.0060.05512.67
5.3.140.0090.05212.66
5.3.130.0100.05412.65
5.3.120.0080.05412.66
5.3.110.0070.05712.66
5.3.100.0110.04912.14
5.3.90.0070.04312.12
5.3.80.0050.04112.11
5.3.70.0080.03412.11
5.3.60.0050.03812.09
5.3.50.0050.03812.04
5.3.40.0050.03812.04
5.3.30.0070.03512.00
5.3.20.0030.03811.77
5.3.10.0080.04811.74
5.3.00.0070.05011.73
5.2.170.0060.0349.23
5.2.160.0040.0309.22
5.2.150.0060.0299.22
5.2.140.0070.0399.22
5.2.130.0060.0289.18
5.2.120.0070.0279.18
5.2.110.0050.0329.19
5.2.100.0020.0319.19
5.2.90.0050.0279.18
5.2.80.0050.0339.18
5.2.70.0080.0449.18
5.2.60.0060.0419.13
5.2.50.0050.0429.10
5.2.40.0070.0379.07
5.2.30.0050.0419.05
5.2.20.0120.0349.04
5.2.10.0080.0348.95
5.2.00.0070.0398.82
5.1.60.0070.0438.09
5.1.50.0040.0368.09
5.1.40.0080.0308.08
5.1.30.0060.0348.43
5.1.20.0050.0328.45
5.1.10.0040.0268.16
5.1.00.0030.0278.17
5.0.50.0030.0226.65
5.0.40.0020.0216.50
5.0.30.0040.0326.32
5.0.20.0060.0256.29
5.0.10.0050.0266.26
5.0.00.0040.0386.25
4.4.90.0030.0214.78
4.4.80.0030.0204.75
4.4.70.0040.0184.76
4.4.60.0030.0194.75
4.4.50.0020.0214.77
4.4.40.0020.0334.71
4.4.30.0060.0194.76
4.4.20.0050.0204.84
4.4.10.0040.0204.85
4.4.00.0060.0284.76
4.3.110.0040.0214.66
4.3.100.0030.0214.66
4.3.90.0030.0204.63
4.3.80.0050.0294.58
4.3.70.0030.0204.63
4.3.60.0030.0204.63
4.3.50.0040.0204.63
4.3.40.0050.0294.54
4.3.30.0040.0203.30
4.3.20.0030.0203.28
4.3.10.0050.0173.24
4.3.00.0030.01315.62