3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { private $value; public function setValue($val) { $this->value = $val; } public function getValue() { return $this->value; } } class B extends A { private $value; public function setValue($val) { $this->value = $val; } } $a = new A; $b = new B; $a->setValue(123); $b->setValue(544); var_dump($a->getValue(), $b->getValue(), $a, $b);
based on jeQ2E

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.0060.00316.42
7.3.00.0080.00416.34
7.2.130.0070.00717.03
7.2.120.0090.00316.89
7.2.110.0080.00416.55
7.2.100.0000.01216.89
7.2.90.0030.00616.88
7.2.80.0000.01116.92
7.2.70.0030.00816.91
7.2.60.0110.00316.83
7.2.50.0080.00416.62
7.2.40.0060.00317.02
7.2.30.0030.01016.81
7.2.20.0120.00317.09
7.2.10.0060.00916.89
7.2.00.0020.01318.08
7.1.250.0030.00615.95
7.1.200.0060.00615.60
7.1.100.0030.00617.77
7.1.70.0060.01017.32
7.1.60.0140.01119.50
7.1.50.0070.01416.96
7.1.00.0000.08022.43
7.0.200.0070.00016.51
7.0.140.0070.06322.00
7.0.60.0030.07719.94
7.0.50.0070.04717.89
7.0.40.0100.04720.23
7.0.30.0370.06020.16
7.0.20.0200.06320.06
7.0.10.0170.05020.21
7.0.00.0100.08320.34
5.6.280.0030.07320.91
5.6.210.0100.06320.61
5.6.200.0030.04018.19
5.6.190.0100.08720.41
5.6.180.0230.07720.59
5.6.170.0500.06320.48
5.6.160.0100.04320.71
5.6.150.0030.04018.16
5.6.140.0070.07718.13
5.6.130.0100.04318.14
5.6.120.0030.08721.15
5.6.110.0030.04321.02
5.6.100.0070.06321.14
5.6.90.0000.04721.11
5.6.80.0070.07720.41
5.6.70.0270.07720.43
5.5.350.0130.04320.39
5.5.340.0100.05018.07
5.5.330.0070.05720.35
5.5.320.0130.08720.47
5.5.310.0270.08020.27
5.5.300.0070.04017.95
5.5.290.0030.08718.02
5.5.280.0100.08020.77
5.5.270.0030.04720.80
5.5.260.0130.07320.77
5.5.250.0070.07720.50
5.5.240.0030.04320.28
5.4.450.0630.05319.48
5.4.440.0170.05019.32
5.4.430.0800.06719.51
5.4.420.0670.06019.23
5.4.410.0770.06719.05
5.4.400.0200.05318.77
5.4.390.0230.05318.86
5.4.380.0270.05318.73
5.4.370.0300.05018.76
5.4.360.0370.04018.79
5.4.350.0200.05718.74
5.4.340.0270.05318.84
5.4.320.0300.06018.73
5.4.310.0230.07318.84
5.4.300.0270.05318.80
5.4.290.0270.05018.47
5.4.280.0170.06318.61
5.4.270.0170.06018.50
5.4.260.0230.05718.56
5.4.250.0270.05718.72
5.4.240.0330.04718.74
5.4.230.0270.05018.52
5.4.220.0270.05318.57
5.4.210.0230.05318.46
5.4.200.0270.05016.55
5.4.190.0200.05318.64
5.4.180.0170.06018.46
5.4.170.0230.05318.71
5.4.160.0270.04718.82
5.4.150.0100.06318.59
5.4.140.0300.05016.27
5.4.130.0270.04316.30
5.4.120.0230.05016.46
5.4.110.0200.05016.35
5.4.100.0230.05016.16
5.4.90.0130.06016.25
5.4.80.0230.04716.29
5.4.70.0200.05716.26
5.4.60.0300.04316.19
5.4.50.0130.05716.23
5.4.40.0200.05316.23
5.4.30.0230.05016.29
5.4.20.0230.06016.29
5.4.10.0200.05716.20
5.4.00.0200.06015.63
5.3.290.0300.05314.80
5.3.280.0230.05314.66
5.3.270.0230.05314.61
5.3.260.0300.05014.64
5.3.250.0230.05314.72
5.3.240.0330.04314.79
5.3.230.0230.05314.58
5.3.220.0100.06314.58
5.3.210.0200.05714.61
5.3.200.0230.05314.62
5.3.190.0230.05314.62
5.3.180.0230.06014.56
5.3.170.0200.05714.58
5.3.160.0200.05714.67
5.3.150.0230.05314.55
5.3.140.0270.05014.56
5.3.130.0230.05014.61
5.3.120.0270.05314.68
5.3.110.0230.05314.77
5.3.100.0200.05314.07
5.3.90.0230.05014.13
5.3.80.0270.04714.09
5.3.70.0200.05314.15
5.3.60.0270.05014.13
5.3.50.0230.05013.98
5.3.40.0170.05714.18
5.3.30.0200.05313.94
5.3.20.0230.05013.73
5.3.10.0170.05713.68
5.3.00.0270.05313.68
5.2.170.0230.04011.17
5.2.160.0200.03711.19
5.2.150.0200.04011.27
5.2.140.0100.05011.35
5.2.130.0230.03711.17
5.2.120.0200.03711.23
5.2.110.0130.04311.22
5.2.100.0170.04011.14
5.2.90.0300.03311.22
5.2.80.0130.04711.21
5.2.70.0270.03711.13
5.2.60.0170.04311.11
5.2.50.0170.04311.05
5.2.40.0070.04711.11
5.2.30.0170.05311.00
5.2.20.0170.04311.00
5.2.10.0100.04310.91
5.2.00.0100.04710.76
5.1.60.0230.02710.20
5.1.50.0130.03710.08
5.1.40.0100.04010.09
5.1.30.0200.03010.52
5.1.20.0100.04710.46
5.1.10.0100.04010.21
5.1.00.0170.03710.28
5.0.50.0100.0308.76
5.0.40.0100.0278.43
5.0.30.0070.0478.36
5.0.20.0200.0338.41
5.0.10.0100.0278.20
5.0.00.0130.0378.18
4.4.90.0030.0277.29
4.4.80.0130.0177.29
4.4.70.0070.0277.29
4.4.60.0070.0237.29
4.4.50.0030.0237.29
4.4.40.0100.0307.29
4.4.30.0100.0207.29
4.4.20.0070.0277.29
4.4.10.0070.0237.29
4.4.00.0100.0337.29
4.3.110.0070.0237.29
4.3.100.0100.0177.29
4.3.90.0030.0237.29
4.3.80.0070.0377.29
4.3.70.0130.0177.29
4.3.60.0070.0207.29
4.3.50.0070.0237.29
4.3.40.0000.0407.29
4.3.30.0100.0177.29
4.3.20.0070.0207.29
4.3.10.0070.0277.29
4.3.00.0100.0239.30