3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public static function who(){ return __CLASS__; } static public function create($params = array()){ $class = self::who(); return new $class($params); } } class bar extends foo {} print_r(foo::create()); print_r(bar::create());

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.110.0230.00316.33
7.2.00.0030.01019.21
7.1.100.0140.01018.16
7.1.70.0000.00817.17
7.1.60.0090.01519.25
7.1.50.0100.00716.95
7.1.00.0030.03722.57
7.0.200.0040.00816.43
7.0.140.0030.07322.09
7.0.120.0030.07322.19
7.0.60.0070.08319.82
7.0.50.0000.04317.85
7.0.40.0170.07317.76
7.0.30.0000.09017.69
7.0.20.0100.08317.84
7.0.10.0100.04717.79
7.0.00.0070.07017.72
5.6.280.0070.06720.78
5.6.210.0100.05020.56
5.6.200.0030.05018.25
5.6.190.0030.08318.18
5.6.180.0030.07018.23
5.6.170.0100.07718.12
5.6.160.0170.07018.22
5.6.150.0100.07718.25
5.6.140.0100.08018.15
5.6.130.0170.07718.14
5.6.120.0030.08718.13
5.6.110.0070.04718.17
5.6.100.0100.04718.27
5.6.90.0070.04318.25
5.6.80.0070.04717.63
5.6.70.0070.07017.54
5.6.60.0070.04717.51
5.6.50.0100.06317.58
5.6.40.0100.03317.50
5.6.30.0030.04717.63
5.6.20.0130.06717.54
5.6.10.0070.07017.53
5.6.00.0030.08017.46
5.5.350.0100.08020.52
5.5.340.0030.04017.98
5.5.330.0030.05018.00
5.5.320.0030.05018.08
5.5.310.0070.08018.08
5.5.300.0130.07718.03
5.5.290.0130.06318.06
5.5.280.0030.08318.07
5.5.270.0130.07717.94
5.5.260.0100.08017.97
5.5.250.0030.06017.77
5.5.240.0070.07717.32
5.5.230.0100.04017.30
5.5.220.0030.07717.45
5.5.210.0070.07717.41
5.5.200.0100.03317.30
5.5.190.0000.08717.30
5.5.180.0070.07717.34
5.5.160.0070.07017.30
5.5.150.0130.06717.30
5.5.140.0030.08317.32
5.5.130.0100.03317.34
5.5.120.0000.06317.34
5.5.110.0100.07317.26
5.5.100.0100.07317.24
5.5.90.0100.05017.23
5.5.80.0030.08317.30
5.5.70.0030.07717.32
5.5.60.0100.07317.19
5.5.50.0100.07017.23
5.5.40.0130.05317.23
5.5.30.0070.03717.25
5.5.20.0100.05717.29
5.5.10.0000.04717.21
5.5.00.0100.07017.22
5.4.450.0100.06719.46
5.4.440.0070.04319.21
5.4.430.0070.04719.41
5.4.420.0000.05019.21
5.4.410.0030.08319.23
5.4.400.0070.04019.04
5.4.390.0170.04018.96
5.4.380.0030.08319.03
5.4.370.0230.06019.06
5.4.360.0070.05319.05
5.4.350.0030.04019.05
5.4.340.0000.04319.05
5.4.320.0070.07318.95
5.4.310.0030.06319.04
5.4.300.0170.06019.11
5.4.290.0130.04319.02
5.4.280.0130.07019.11
5.4.270.0000.05719.01
5.4.260.0070.07718.95
5.4.250.0070.06019.16
5.4.240.0100.06019.00
5.4.230.0100.07719.13
5.4.220.0100.07319.04
5.4.210.0100.07319.27
5.4.200.0100.04319.13
5.4.190.0030.05019.26
5.4.180.0070.04719.16
5.4.170.0070.07319.04
5.4.160.0030.05318.86
5.4.150.0030.05718.87
5.4.140.0000.04316.36
5.4.130.0130.06016.33
5.4.120.0030.05316.36
5.4.110.0000.04016.54
5.4.100.0070.07016.46
5.4.90.0170.05316.47
5.4.80.0130.06716.27
5.4.70.0000.04716.49
5.4.60.0030.04316.48
5.4.50.0200.04016.42
5.4.40.0000.04016.61
5.4.30.0100.06716.27
5.4.20.0030.04016.39
5.4.10.0070.03716.20
5.4.00.0030.03715.86
5.3.290.0130.06714.70
5.3.280.0100.04714.45
5.3.270.0070.03714.67
5.3.260.0030.06014.66
5.3.250.0030.08014.82
5.3.240.0130.06014.68
5.3.230.0000.06714.66
5.3.220.0030.08314.64
5.3.210.0130.07314.63
5.3.200.0000.04314.78
5.3.190.0000.05714.42
5.3.180.0030.06314.67
5.3.170.0070.06314.53
5.3.160.0070.08014.60
5.3.150.0070.06314.60
5.3.140.0030.07314.59
5.3.130.0070.06314.61
5.3.120.0070.06714.60
5.3.110.0000.05014.65
5.3.100.0000.04013.99
5.3.90.0000.05313.97
5.3.80.0000.08314.00
5.3.70.0100.03713.86
5.3.60.0130.03013.87
5.3.50.0030.04713.99
5.3.40.0130.07314.01
5.3.30.0000.08313.96
5.3.20.0130.05713.73
5.3.10.0070.07313.69
5.3.00.0070.06313.53
5.2.170.0070.04711.22
5.2.160.0070.06311.17
5.2.150.0070.03711.21
5.2.140.0100.03711.20
5.2.130.0000.06311.17
5.2.120.0070.04011.11
5.2.110.0030.06011.21
5.2.100.0000.05311.10
5.2.90.0070.04011.31
5.2.80.0030.05311.13
5.2.70.0070.05311.08
5.2.60.0100.06011.09
5.2.50.0030.04710.91
5.2.40.0000.06010.89
5.2.30.0070.05711.05
5.2.20.0030.06011.00
5.2.10.0100.03010.95
5.2.00.0030.02710.75
5.1.60.0070.02010.08
5.1.50.0000.0279.94
5.1.40.0000.0339.95
5.1.30.0000.02710.38
5.1.20.0000.03010.57
5.1.10.0000.02710.02
5.1.00.0030.02310.02
5.0.50.0000.0208.61
5.0.40.0030.0178.41
5.0.30.0000.0338.45
5.0.20.0070.0138.30
5.0.10.0000.0208.30
5.0.00.0100.0238.30
4.4.90.0030.0238.30
4.4.80.0030.0378.30
4.4.70.0030.0338.30
4.4.60.0000.0178.30
4.4.50.0030.0178.30
4.4.40.0000.0278.30
4.4.30.0000.0178.30
4.4.20.0000.0178.30
4.4.10.0000.0178.30
4.4.00.0000.0238.30
4.3.110.0000.0178.30
4.3.100.0000.0138.30
4.3.90.0030.0108.30
4.3.80.0000.0238.30
4.3.70.0000.0138.30
4.3.60.0000.0138.30
4.3.50.0000.0138.30
4.3.40.0000.0238.30
4.3.30.0000.0178.30
4.3.20.0000.0178.30
4.3.10.0000.0138.30
4.3.00.0000.0138.30