3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Base { private $_e; protected function setE() { $this->$_e++; } public function getE() { return $this->$_e; } } class Foo extends Base { public function __contruct() { $this->setE(); } } class Bar extends Base { public function __contruct() { $this->setE(); } } $foo = new Foo; //$bar = new Bar; echo $foo->getE();
based on 0gfHJ

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.10.0110.00416.39
7.3.00.0070.00316.63
7.2.130.0140.00316.77
7.2.120.0030.01416.81
7.2.110.0230.01316.81
7.2.100.0060.00916.79
7.2.90.0070.01116.76
7.2.80.0030.01317.01
7.2.70.0170.00316.98
7.2.60.0030.00916.71
7.2.50.0080.00616.90
7.2.40.0030.01216.73
7.2.30.0100.01016.70
7.2.20.0000.01017.08
7.2.10.0100.00317.07
7.2.00.0040.00918.00
7.1.250.0060.00915.49
7.1.200.0100.00315.84
7.1.100.0040.00718.05
7.1.70.0030.01717.13
7.1.60.0090.01619.19
7.1.50.0080.01516.88
7.1.00.0030.07322.48
7.0.200.0030.00616.85
7.0.60.0070.07320.05
7.0.50.0100.07717.87
7.0.40.0070.08320.18
7.0.30.0400.06020.26
7.0.20.0300.05320.12
7.0.10.0030.05320.33
7.0.00.0070.08320.08
5.6.280.0030.03020.93
5.6.210.0070.08020.52
5.6.200.0030.05318.18
5.6.190.0100.07320.46
5.6.180.0270.07720.60
5.6.170.0300.07320.54
5.6.160.0270.04720.70
5.6.150.0000.06318.21
5.6.140.0100.04018.27
5.6.130.0130.07318.20
5.6.120.0030.08721.07
5.6.110.0070.08320.92
5.6.100.0070.04721.05
5.6.90.0030.05021.11
5.6.80.0030.08720.50
5.5.350.0130.06720.50
5.5.340.0030.03717.95
5.5.330.0100.08020.26
5.5.320.0330.07320.38
5.5.310.0270.04020.34
5.5.300.0030.05018.05
5.5.290.0070.08017.96
5.5.280.0070.05020.80
5.5.270.0000.04320.79
5.5.260.0070.09020.88
5.5.250.0070.07720.69
5.5.240.0070.06720.36
5.4.450.0370.04319.34
5.4.440.0130.06019.35
5.4.430.0170.07319.55
5.4.420.0230.05319.58
5.4.410.0170.06019.47
5.4.400.0170.06019.37
5.4.390.0230.06319.26
5.4.380.0270.04719.26
5.4.370.0270.05319.02
5.4.360.0170.07019.30
5.4.350.0170.05718.98
5.4.340.0200.06719.13
5.4.320.0130.06019.15
5.4.310.0100.06718.84
5.4.300.0030.06319.25
5.4.290.0330.06019.13
5.4.280.0130.05319.20
5.4.270.0200.04718.86
5.4.260.0170.05719.01
5.4.250.0070.06019.00
5.4.240.0070.05719.27
5.4.230.0100.05719.30
5.4.220.0100.05718.83
5.4.210.0270.03719.01
5.4.200.0170.04719.11
5.4.190.0100.05319.27
5.4.180.0130.05318.83
5.4.170.0200.05019.36
5.4.160.0230.05018.84
5.4.150.0130.06019.29
5.4.140.0230.06016.37
5.4.130.0100.05316.36
5.4.120.0070.07016.76
5.4.110.0230.05316.45
5.4.100.0130.05316.66
5.4.90.0130.06016.67
5.4.80.0200.04316.57
5.4.70.0100.04316.44
5.4.60.0030.03316.44
5.4.50.0130.06016.22
5.4.40.0230.03716.52
5.4.30.0400.05716.51
5.4.20.0170.04716.55
5.3.290.4270.03714.75
5.3.280.3930.03714.68
5.3.270.3030.04014.58
5.3.260.3700.04314.62
5.3.250.0300.07014.51
5.3.240.3300.03014.51
5.3.230.0300.05014.82
5.3.220.0430.05714.54
5.3.210.0330.05014.68
5.3.200.3200.04014.57
5.3.190.3230.04314.47
5.3.180.0200.04314.68