3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public $name = ""; public $surname = ""; public function __construct() { $this->name = "Name"; $this->surname = "Surname"; } } class Bar { public function __construct(Foo $foo) { $object = compact('foo'); echo $object['foo']['name']; } } $f = new Foo(); $b = new Bar($f);
based on 7mX3h

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.0rc40.0210.00698.97
7.3.0rc30.0030.01016.57
7.3.0beta10.0030.00312.84
7.3.0alpha10.0070.00312.71
7.2.60.0070.00716.55
7.2.00.0030.00919.30
7.1.200.0090.00315.89
7.1.100.0000.01718.19
7.1.70.0040.00416.97
7.1.60.0090.01519.32
7.1.50.0070.01716.99
7.1.00.0030.07722.35
7.0.200.0000.00916.80
7.0.140.0070.07021.99
7.0.60.0270.06319.90
7.0.50.0000.05717.96
7.0.40.0230.04320.04
7.0.30.0170.08720.23
7.0.20.0270.06020.21
7.0.10.0100.07720.24
7.0.00.0030.05320.12
5.6.280.0100.06721.08
5.6.210.0170.07020.55
5.6.200.0070.04718.27
5.6.190.0070.04320.61
5.6.180.0270.07020.52
5.6.170.0300.04720.44
5.6.160.0030.04320.52
5.6.150.0100.08018.25
5.6.140.0030.07718.12
5.6.130.0030.04018.12
5.6.120.0100.03320.98
5.6.110.0030.04021.12
5.6.100.0130.08321.17
5.6.90.0170.07321.13
5.6.80.0100.07720.49
5.5.350.0330.06320.44
5.5.340.0030.09017.98
5.5.330.0030.04320.43
5.5.320.0270.03720.27
5.5.310.0270.06320.34
5.5.300.0100.08017.96
5.5.290.0100.08317.97
5.5.280.0100.08320.88
5.5.270.0000.08320.80
5.5.260.0000.04320.68
5.5.250.0030.04020.79
5.5.240.0200.05720.16
5.4.450.0870.04719.39
5.4.440.0470.06319.55
5.4.430.0470.06719.66
5.4.420.0670.00019.39
5.4.410.0630.00019.12
5.4.400.0630.00019.11
5.4.390.0730.00019.16
5.4.380.0630.00019.00
5.4.370.0630.00019.06
5.4.360.0630.00019.16
5.4.350.0630.00019.21
5.4.340.0630.00019.26
5.4.320.0060.03612.50
5.4.310.0060.03812.50
5.4.300.0060.03512.50
5.4.290.0050.03912.50
5.4.280.0070.04112.40
5.4.270.0050.03812.40
5.4.260.0080.05012.40
5.4.250.0030.04312.40
5.4.240.0070.03612.40
5.4.230.0080.04112.39
5.4.220.0070.04012.39
5.4.210.0060.03512.39
5.4.200.0060.04512.39
5.4.190.0090.03412.39
5.4.180.0060.04112.38
5.4.170.0040.03912.40
5.4.160.0040.03612.39
5.4.150.0090.03212.39
5.4.140.0020.04012.08
5.4.130.0050.03712.06
5.4.120.0060.03512.02
5.4.110.0070.03312.02
5.4.100.0040.04112.02
5.4.90.0020.04012.01
5.4.80.0120.03212.02
5.4.70.0060.03712.01
5.4.60.0070.03312.02
5.4.50.0070.03412.01
5.4.40.0070.03312.00
5.4.30.0080.03612.00
5.4.20.0090.03812.00
5.4.10.0050.03512.00
5.4.00.0070.03711.49
5.3.290.0070.04012.80
5.3.280.0050.03912.70
5.3.270.0090.03912.73
5.3.260.0080.04612.72
5.3.250.0070.03512.72
5.3.240.0050.05012.72
5.3.230.0070.03712.71
5.3.220.0060.03912.68
5.3.210.0100.03512.68
5.3.200.0080.03512.68
5.3.190.0040.03912.68
5.3.180.0070.03512.67
5.3.170.0080.03512.66
5.3.160.0060.03612.67
5.3.150.0060.03712.68
5.3.140.0050.04012.66
5.3.130.0110.03812.66
5.3.120.0050.03912.66
5.3.110.0080.03712.66
5.3.100.0080.04412.13
5.3.90.0050.03612.11
5.3.80.0110.03112.10
5.3.70.0060.03612.10
5.3.60.0040.03812.09
5.3.50.0040.03812.04
5.3.40.0040.03812.03
5.3.30.0060.03811.99
5.3.20.0060.03811.77
5.3.10.0060.03411.74
5.3.00.0060.03611.73
5.2.170.0060.0299.23
5.2.160.0020.0319.23
5.2.150.0040.0309.23
5.2.140.0060.0379.22
5.2.130.0060.0309.18
5.2.120.0060.0279.18
5.2.110.0060.0289.20
5.2.100.0050.0289.19
5.2.90.0080.0379.19
5.2.80.0060.0379.18
5.2.70.0050.0299.18
5.2.60.0070.0279.13
5.2.50.0040.0309.10
5.2.40.0030.0319.08
5.2.30.0040.0309.06
5.2.20.0040.0379.04
5.2.10.0040.0288.95
5.2.00.0070.0368.82
5.1.60.0060.0238.10
5.1.50.0040.0248.09
5.1.40.0030.0258.07
5.1.30.0010.0298.42
5.1.20.0050.0268.45
5.1.10.0040.0268.17
5.1.00.0030.0268.17
5.0.50.0050.0186.65
5.0.40.0030.0206.50
5.0.30.0050.0296.32
5.0.20.0050.0206.29
5.0.10.0040.0196.27
5.0.00.0020.0316.26
4.4.90.0030.0154.78
4.4.80.0030.0154.75
4.4.70.0010.0174.75
4.4.60.0030.0154.76
4.4.50.0030.0144.77
4.4.40.0030.0244.71
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0030.0154.85
4.4.00.0040.0234.76
4.3.110.0010.0174.66
4.3.100.0050.0124.67
4.3.90.0040.0134.64
4.3.80.0010.0304.59
4.3.70.0000.0174.63
4.3.60.0040.0184.63
4.3.50.0030.0194.63
4.3.40.0010.0264.54
4.3.30.0030.0203.30
4.3.20.0010.0173.28
4.3.10.0000.0173.24
4.3.00.0170.01716.50