3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class User { private $username; private $password; public function getUsername() :string { return $this->username; } public function setUsername(string $username) { $this->username = $username; } public function getPassword() : string { return $this->password; } public function setPassword(string $password) { $this->password = $password; } }

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.0090.00616.64
7.2.00.0040.00819.01
7.1.200.0070.00715.49
7.1.100.0040.00717.88
7.1.70.0000.01017.01
7.1.60.0180.00719.36
7.1.50.0060.00616.90
7.1.00.0070.07322.57
7.0.200.0000.01016.66
7.0.60.0130.06019.96
7.0.50.0030.05017.87
7.0.40.0100.08320.11
7.0.30.0200.05320.23
7.0.20.0130.05720.25
7.0.10.0030.09720.21
7.0.00.0030.08720.25
5.6.280.0030.04020.91
5.6.210.0070.08020.47
5.6.200.0100.07718.16
5.6.190.0100.06020.61
5.6.180.0430.07720.67
5.6.170.0300.04020.62
5.6.160.0100.08020.50
5.6.150.0030.05318.18
5.6.140.0170.06018.13
5.6.130.0030.04018.17
5.6.120.0100.08021.04
5.6.110.0030.06021.12
5.6.100.0100.08720.98
5.6.90.0100.08321.08
5.6.80.0070.03720.50
5.5.350.3630.04020.44
5.5.340.0100.07717.96
5.5.330.0130.07720.44
5.5.320.0070.07020.34
5.5.310.0230.04020.35
5.5.300.0100.07718.08
5.5.290.0100.08317.98
5.5.280.0030.04320.97
5.5.270.0100.04020.84
5.5.260.0030.08020.84
5.5.250.0000.06720.58
5.5.240.0200.06720.16
5.4.450.1030.06019.31
5.4.440.1170.05719.17
5.4.430.0830.05719.37
5.4.420.1030.07719.46
5.4.410.1130.05319.16
5.4.400.1100.05019.11
5.4.390.1230.07319.08
5.4.380.1070.05319.37
5.4.370.1300.06719.22
5.4.360.0830.05719.10
5.4.350.0800.05319.28
5.4.340.0870.04719.29
5.4.320.0930.04719.15
5.4.310.1070.05018.97
5.4.300.0870.05018.97
5.4.290.0870.05019.11
5.4.280.0900.04719.30
5.4.270.0870.04719.00
5.4.260.0830.05319.14
5.4.250.0900.04319.04
5.4.240.0870.05319.27
5.4.230.1100.05019.00
5.4.220.0900.04719.24
5.4.210.0830.05019.24
5.4.200.0870.04719.14
5.4.190.0930.05319.04
5.4.180.1130.04719.01
5.4.170.1270.06319.24
5.4.160.0930.04319.28
5.4.150.0970.05019.20
5.4.140.0830.05316.45
5.4.130.1000.06016.40
5.4.120.0770.05316.54
5.4.110.0330.06716.60
5.4.100.0030.06316.45
5.4.90.0730.04716.45
5.3.290.1000.06314.71
5.3.280.0870.05014.59
5.3.270.1030.05314.46
5.3.260.0830.05314.59
5.3.250.0930.04714.53
5.3.240.0800.05714.50
5.3.230.0970.04314.75
5.3.220.0970.04714.48
5.3.210.0870.05714.57
5.3.200.0130.06014.53
5.3.190.0900.05014.47