3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function whoami() { return 'A'; } public function __call($method, array $args) { return 'A::__call::' . $method; } } class BB extends A { public function whoami() { return 'BB'; } public function getX() { return 'BB::getX (FYI: parent is ' . parent::whoami(). ') -> ' . parent::getX() ; } } class CCC extends BB { public function whoami() { return 'CCC'; } public function __call($method, array $args) { return 'CCC::__call::' . $method . ' -> ' . parent::__call($method, $args); } } $c = new CCC(); echo $c->getX() . "\n";

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.00.0030.01119.49
7.1.100.0090.00317.74
7.1.70.0000.01316.73
7.1.60.0090.01519.33
7.1.50.0070.01716.57
7.1.00.0070.07322.44
7.0.200.0100.00716.66
7.0.140.0000.07722.04
7.0.60.0000.08719.93
7.0.50.0030.04017.87
7.0.40.0070.07320.11
7.0.30.0200.06720.26
7.0.20.0270.07720.02
7.0.10.0070.08320.07
7.0.00.0070.06320.07
5.6.280.0030.07320.99
5.6.210.0200.07320.51
5.6.200.0030.05018.29
5.6.190.0070.07020.34
5.6.180.0270.03720.50
5.6.170.0230.05020.44
5.6.160.0070.03720.44
5.6.150.0100.03718.16
5.6.140.0030.08718.23
5.6.130.0030.06018.18
5.6.120.0070.08320.98
5.6.110.0070.07721.02
5.6.100.0030.06020.98
5.6.90.0230.06720.95
5.6.80.0100.06720.29
5.6.70.4430.04320.42
5.5.350.0130.08720.39
5.5.340.0070.06317.98
5.5.330.0100.04020.21
5.5.320.0500.04320.51
5.5.310.0330.05320.36
5.5.300.0070.08017.98
5.5.290.0100.06718.08
5.5.280.0070.05320.75
5.5.270.0100.08320.87
5.5.260.0100.08320.80
5.5.250.0030.08020.69
5.5.240.0230.07020.27
5.4.450.0870.06719.30
5.4.440.1100.04719.54
5.4.430.0100.05019.56
5.4.420.0630.00019.21
5.4.410.0130.05318.70
5.4.400.0100.06718.76
5.4.390.0400.04318.79
5.4.380.0170.05718.57
5.4.370.0100.05318.70
5.4.360.0100.04318.57
5.4.350.0070.03212.02
5.4.340.0060.03412.02
5.4.320.0090.04212.51
5.4.310.0050.04912.50
5.4.300.0070.04412.51
5.4.290.0080.04912.50
5.4.280.0060.03512.40
5.4.270.0060.04412.39
5.4.260.0110.03912.40
5.4.250.0080.05012.40
5.4.240.0080.04112.40
5.4.230.0070.05212.39
5.4.220.0040.03812.39
5.4.210.0100.03712.39
5.4.200.0070.05412.39
5.4.190.0130.04512.36
5.4.180.0120.04712.36
5.4.170.0200.03912.38
5.4.160.0180.04312.37
5.4.150.0150.04512.37
5.4.140.0190.04012.05
5.4.130.0160.04312.04
5.4.120.0080.05112.00
5.4.110.0180.04111.99
5.4.100.0170.04611.99
5.4.90.0220.04011.99
5.4.80.0180.04311.99
5.4.70.0180.04211.99
5.4.60.0150.04711.99
5.4.50.0170.04711.99
5.4.40.0150.04411.98
5.4.30.0200.04111.97
5.4.20.0190.03911.98
5.4.10.0160.04111.98
5.4.00.0140.04211.46
5.3.290.0110.04512.80
5.3.280.0050.03712.71
5.3.270.0130.04812.73
5.3.260.0100.05112.72
5.3.250.0160.04512.72
5.3.240.0140.04712.72
5.3.230.0170.04612.71
5.3.220.0190.04112.68
5.3.210.0170.04612.68
5.3.200.0170.04712.68
5.3.190.0180.04512.68
5.3.180.0130.04812.68
5.3.170.0180.04512.67
5.3.160.0180.04312.67
5.3.150.0170.04512.67
5.3.140.0230.04012.66
5.3.130.0210.04212.66
5.3.120.0190.04412.66
5.3.110.0200.04112.66
5.3.100.0210.04012.12
5.3.90.0180.04212.09
5.3.80.0190.04412.08
5.3.70.0190.04212.08
5.3.60.0170.04412.06
5.3.50.0160.04412.00
5.3.40.0130.04712.01
5.3.30.0150.04511.98
5.3.20.0110.04811.75
5.3.10.0180.04011.72
5.3.00.0190.03911.70
5.2.170.0150.0339.21
5.2.160.0110.0399.21
5.2.150.0150.0369.21
5.2.140.0180.0369.21
5.2.130.0180.0329.17
5.2.120.0110.0379.17
5.2.110.0140.0399.17
5.2.100.0070.0409.17
5.2.90.0140.0389.17
5.2.80.0110.0379.16
5.2.70.0170.0329.15
5.2.60.0120.0389.12
5.2.50.0140.0349.09
5.2.40.0120.0389.07
5.2.30.0120.0359.04
5.2.20.0190.0309.04
5.2.10.0090.0388.94
5.2.00.0100.0368.79
5.1.60.0130.0288.07
5.1.50.0120.0298.07
5.1.40.0130.0288.05
5.1.30.0120.0318.40
5.1.20.0180.0278.43
5.1.10.0140.0308.15
5.1.00.0090.0338.14
5.0.50.0070.0296.63
5.0.40.0110.0256.48
5.0.30.0080.0386.30
5.0.20.0100.0256.27
5.0.10.0100.0256.23
5.0.00.0080.0376.23
4.4.90.0070.0204.78
4.4.80.0070.0184.75
4.4.70.0110.0194.75
4.4.60.0120.0144.76
4.4.50.0070.0194.77
4.4.40.0060.0334.71
4.4.30.0150.0204.76
4.4.20.0080.0214.84
4.4.10.0060.0274.85
4.4.00.0100.0274.76
4.3.110.0100.0154.67
4.3.100.0050.0204.67
4.3.90.0090.0174.63
4.3.80.0100.0274.58
4.3.70.0110.0174.63
4.3.60.0080.0214.63
4.3.50.0080.0204.62
4.3.40.0070.0284.54
4.3.30.0050.0193.30
4.3.20.0050.0193.28
4.3.10.0060.0173.24
4.3.00.0200.0237.80