3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SomeClass { public $_someMember; public function __construct() { $this->_someMember = 1; } public static function getSomethingStatic() { $object = new self(); return $object->_someMember * 5; // here's the catch } } echo SomeClass::getSomethingStatic();

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.0110.00417.20
7.2.00.0030.01419.36
7.1.200.0160.00715.75
7.1.100.0070.00718.32
7.1.70.0060.00617.35
7.1.60.0140.01019.46
7.1.50.0090.01216.87
7.1.00.0030.07722.40
7.0.200.0000.00716.49
7.0.140.0000.07722.02
7.0.60.0170.03720.02
7.0.50.0100.03717.91
7.0.40.0070.04320.25
7.0.30.0530.07320.07
7.0.20.0200.08020.23
7.0.10.0230.03720.07
7.0.00.0030.05020.23
5.6.280.0000.07321.07
5.6.210.0030.08320.48
5.6.200.0030.05018.16
5.6.190.0030.09020.63
5.6.180.3230.03320.30
5.6.170.0230.08020.47
5.6.160.0100.08020.44
5.6.150.0230.06318.29
5.6.140.0070.07018.28
5.6.130.0100.05018.11
5.6.120.0070.07721.05
5.6.110.0070.04321.14
5.6.100.0170.06721.04
5.6.90.0170.07720.97
5.6.80.0100.07320.37
5.6.70.0270.04320.44
5.5.350.0230.03320.41
5.5.340.0130.07317.99
5.5.330.0100.08020.35
5.5.320.0230.08020.47
5.5.310.0370.03720.23
5.5.300.0000.07718.04
5.5.290.0100.07718.04
5.5.280.0000.04320.88
5.5.270.0100.03720.73
5.5.260.0070.05720.90
5.5.250.0170.06020.56
5.5.240.0070.04020.05
5.4.450.0370.06319.57
5.4.440.0770.05719.34
5.4.430.0870.05719.21
5.4.420.0630.00019.46
5.4.410.0200.05019.04
5.4.400.0230.07018.61
5.4.390.0170.06318.78
5.4.380.0200.05718.48
5.4.370.0100.05018.74
5.4.360.0030.04718.63
5.4.350.0080.03512.03
5.4.340.0070.03912.02
5.4.320.0060.03412.50
5.4.310.0060.04812.50
5.4.300.0080.03712.50
5.4.290.0070.04012.50
5.4.280.0050.03612.40
5.4.270.0100.03912.39
5.4.260.0070.04712.40
5.4.250.0050.04012.40
5.4.240.0050.03712.39
5.4.230.0060.03812.39
5.4.220.0080.03412.39
5.4.210.0100.03212.39
5.4.200.0070.03612.39
5.4.190.0040.03912.38
5.4.180.0050.03812.39
5.4.170.0090.03312.40
5.4.160.0040.03712.39
5.4.150.0060.03712.39
5.4.140.0060.03612.07
5.4.130.0070.03612.06
5.4.120.0050.03812.02
5.4.110.0080.03612.02
5.4.100.0080.03612.02
5.4.90.0040.04312.02
5.4.80.0050.03812.02
5.4.70.0070.03612.01
5.4.60.0050.03512.01
5.4.50.0050.03812.01
5.4.40.0080.04212.00
5.4.30.0060.03512.00
5.4.20.0080.04012.00
5.4.10.0100.03212.00
5.4.00.0070.03811.48
5.3.290.0080.05512.80
5.3.280.0080.04112.71
5.3.270.0060.03912.72
5.3.260.0070.03812.71
5.3.250.0050.04012.72
5.3.240.0120.04312.72
5.3.230.0120.04412.71
5.3.220.0070.05012.68
5.3.210.0040.05412.68
5.3.200.0150.06112.68
5.3.190.0050.04512.68
5.3.180.0070.03712.67
5.3.170.0070.04412.67
5.3.160.0070.04412.68
5.3.150.0060.05112.68
5.3.140.0080.03912.66
5.3.130.0060.04012.66
5.3.120.0060.06812.66
5.3.110.0040.04612.66
5.3.100.0140.06412.12
5.3.90.0080.03612.10
5.3.80.0020.04112.09
5.3.70.0030.04112.09
5.3.60.0090.03412.07
5.3.50.0080.03712.02
5.3.40.0060.04112.02
5.3.30.0070.04711.98
5.3.20.0100.04611.77
5.3.10.0050.05411.73
5.3.00.0130.05311.71
5.2.170.0060.0479.22
5.2.160.0070.0399.23
5.2.150.0070.0399.22
5.2.140.0060.0419.22
5.2.130.0060.0309.18
5.2.120.0020.0449.18
5.2.110.0100.0449.18
5.2.100.0050.0299.18
5.2.90.0090.0269.18
5.2.80.0070.0289.18
5.2.70.0060.0299.18
5.2.60.0060.0289.13
5.2.50.0070.0289.09
5.2.40.0100.0249.07
5.2.30.0060.0309.05
5.2.20.0080.0269.04
5.2.10.0060.0308.95
5.2.00.0050.0308.81
5.1.60.0090.0298.09
5.1.50.0060.0278.08
5.1.40.0070.0258.07
5.1.30.0060.0358.41
5.1.20.0060.0368.44
5.1.10.0050.0348.16
5.1.00.0080.0328.16
5.0.50.0070.0246.64
5.0.40.0020.0286.50
5.0.30.0050.0356.31
5.0.20.0050.0196.28
5.0.10.0060.0206.25
5.0.00.0020.0316.25
4.4.90.0020.0164.78
4.4.80.0040.0144.75
4.4.70.0020.0164.75
4.4.60.0000.0184.75
4.4.50.0030.0174.77
4.4.40.0020.0264.71
4.4.30.0040.0144.76
4.4.20.0030.0174.84
4.4.10.0030.0164.85
4.4.00.0050.0264.76
4.3.110.0030.0184.67
4.3.100.0040.0174.67
4.3.90.0040.0214.63
4.3.80.0040.0324.58
4.3.70.0060.0194.63
4.3.60.0020.0224.63
4.3.50.0030.0224.63
4.3.40.0030.0334.54
4.3.30.0050.0203.30
4.3.20.0040.0203.27
4.3.10.0020.0173.24
4.3.00.0130.0237.59