3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class User { } class Profile { public function __construct(User $user) { $this->user = $user; } } $user1 = new User; $prof1 = new Profile($user1); $user2 = new User; $prof2 = new Profile($user2); var_dump($profile1 == $user2);

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.0030.00616.89
7.2.00.0030.01519.42
7.1.200.0040.00715.70
7.1.100.0040.00817.87
7.1.70.0080.00016.95
7.1.60.0160.00919.70
7.1.50.0100.01416.54
7.1.00.0130.07022.45
7.0.200.0070.00016.76
7.0.140.0000.07721.95
7.0.60.0070.04019.96
7.0.50.0070.07017.84
7.0.40.0070.08019.96
7.0.30.0500.06720.34
7.0.20.0270.07720.25
7.0.10.0100.08720.09
7.0.00.0070.06020.20
5.6.280.0100.06720.99
5.6.210.0070.06320.57
5.6.200.0030.06018.29
5.6.190.0100.04020.55
5.6.180.3800.04320.52
5.6.170.0230.08720.50
5.6.160.0070.06020.55
5.6.150.0100.07718.16
5.6.140.0070.06318.15
5.6.130.0200.07018.28
5.6.120.0030.04021.00
5.6.110.0070.08720.94
5.6.100.0100.06721.02
5.6.90.0030.05320.98
5.6.80.0070.05720.40
5.6.70.0030.08720.36
5.5.350.0170.05020.47
5.5.340.0100.07718.01
5.5.330.0030.04720.45
5.5.320.0300.05020.24
5.5.310.0500.06020.34
5.5.300.0030.07717.92
5.5.290.0070.05317.97
5.5.280.0100.04320.66
5.5.270.0100.08020.67
5.5.260.0130.08020.97
5.5.250.0070.08720.69
5.5.240.0170.07720.26
5.4.450.0130.04729.92
5.4.440.0230.05329.92
5.4.430.0430.03728.29
5.4.420.0030.04728.29
5.4.410.0200.04328.29
5.4.400.0300.03728.29
5.4.390.0800.05028.29
5.4.380.0930.05318.70
5.4.370.0730.05718.62
5.4.360.0600.06018.51
5.4.350.0800.06318.59
5.4.340.0830.03718.43
5.4.320.0100.04912.50
5.4.310.0040.04512.50
5.4.300.0100.04012.50
5.4.290.0040.04312.50
5.4.280.0100.04112.39
5.4.270.0070.04012.40
5.4.260.0050.04112.39
5.4.250.0050.04212.39
5.4.240.0080.03812.40
5.4.230.0070.04612.39
5.4.220.0070.04512.39
5.4.210.0070.05012.39
5.4.200.0110.04812.39
5.4.190.0080.04512.38
5.4.180.0070.03912.38
5.4.170.0110.04612.39
5.4.160.0080.03912.39
5.4.150.0050.03912.39
5.4.140.0070.03612.07
5.4.130.0100.03412.06
5.4.120.0070.04012.02
5.4.110.0100.05512.01
5.4.100.0090.04112.01
5.4.90.0050.03912.01
5.4.80.0050.04212.01
5.4.70.0100.03412.01
5.4.60.0100.03912.01
5.4.50.0090.03812.00
5.4.40.0070.03512.00
5.4.30.0090.03512.00
5.4.20.0100.03111.99
5.4.10.0070.03512.00
5.4.00.0070.03911.48
5.3.290.0060.04012.80
5.3.280.0090.04112.71
5.3.270.0070.03812.73
5.3.260.0060.04012.72
5.3.250.0050.04012.72
5.3.240.0050.04512.71
5.3.230.0070.05012.71
5.3.220.0130.04312.68
5.3.210.0100.05112.68
5.3.200.0050.04212.68
5.3.190.0060.03812.67
5.3.180.0070.04712.68
5.3.170.0090.04712.67
5.3.160.0110.04512.67
5.3.150.0070.04312.67
5.3.140.0070.03412.66
5.3.130.0060.03812.66
5.3.120.0060.03912.66
5.3.110.0030.04212.66
5.3.100.0050.03812.12
5.3.90.0060.03812.10
5.3.80.0070.03812.09
5.3.70.0050.03812.09
5.3.60.0040.03812.07
5.3.50.0030.04112.02
5.3.40.0070.03812.02
5.3.30.0060.03911.98
5.3.20.0070.04911.77
5.3.10.0100.03411.73
5.3.00.0070.04211.71
5.2.170.0070.0379.21
5.2.160.0050.0359.22
5.2.150.0060.0369.21
5.2.140.0060.0389.21
5.2.130.0040.0359.18
5.2.120.0060.0409.17
5.2.110.0040.0369.19
5.2.100.0050.0359.18
5.2.90.0090.0329.18
5.2.80.0100.0319.18
5.2.70.0110.0929.18
5.2.60.0050.0339.13
5.2.50.0050.0329.09
5.2.40.0030.0339.08
5.2.30.0070.0359.05
5.2.20.0060.0339.04
5.2.10.0070.0338.94
5.2.00.0040.0358.80
5.1.60.0040.0278.09
5.1.50.0050.0298.08
5.1.40.0070.0298.07
5.1.30.0080.0308.42
5.1.20.0060.0328.44
5.1.10.0070.0268.16
5.1.00.0070.0288.16
5.0.50.0040.0256.64
5.0.40.0050.0226.50
5.0.30.0020.0366.31
5.0.20.0040.0226.29
5.0.10.0050.0276.25
5.0.00.0070.0346.24
4.4.90.0040.0194.78
4.4.80.0030.0174.75
4.4.70.0030.0154.75
4.4.60.0010.0184.76
4.4.50.0030.0174.77
4.4.40.0020.0274.71
4.4.30.0020.0174.76
4.4.20.0030.0194.85
4.4.10.0040.0184.85
4.4.00.0030.0274.76
4.3.110.0040.0174.67
4.3.100.0020.0164.66
4.3.90.0030.0154.63
4.3.80.0040.0274.59
4.3.70.0020.0194.63
4.3.60.0040.0164.62
4.3.50.0010.0244.63
4.3.40.0050.0314.54
4.3.30.0010.0193.30
4.3.20.0010.0183.28
4.3.10.0010.0173.24
4.3.00.0030.01728.29