3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Test; class Test { private $s; private $i; public function __construct(string $s, int $i) { $this->s = $s; $this->i = $i; } public function foo() { return $this->s . ' ' . $this->i; } } $a = new Test('', '0'); echo $a->foo();
based on COh9V

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.0060.00917.09
7.2.00.0040.01119.28
7.1.200.0090.00015.88
7.1.100.0060.00618.09
7.1.70.0000.00817.12
7.1.60.0030.02019.48
7.1.50.0060.00916.90
7.1.00.0030.07722.42
7.0.200.0390.00014.37
7.0.60.0070.06319.78
7.0.50.0000.05717.95
7.0.40.0130.05020.16
7.0.30.0430.07320.08
7.0.20.0330.07320.05
7.0.10.0070.05720.30
7.0.00.0030.04020.11
5.6.280.0000.04321.16
5.6.210.0070.04720.48
5.6.200.0030.07318.18
5.6.190.0000.09020.68
5.6.180.0330.07320.62
5.6.170.0200.08320.34
5.6.160.0070.08320.57
5.6.150.0030.04018.16
5.6.140.0130.06018.18
5.6.130.0030.06018.28
5.6.120.0030.08721.15
5.6.110.0130.08020.99
5.6.100.0170.07021.00
5.6.90.0100.04321.01
5.6.80.0030.08320.54
5.5.350.4100.04720.37
5.5.340.0070.06717.92
5.5.330.0100.07720.34
5.5.320.0070.09320.34
5.5.310.0270.07720.30
5.5.300.0100.08017.99
5.5.290.0070.04717.94
5.5.280.0070.08320.97
5.5.270.0070.08320.77
5.5.260.0030.05320.88
5.5.250.0030.04720.80
5.5.240.0200.06720.34
5.4.450.0770.06019.30
5.4.440.0800.05319.54
5.4.430.0670.05019.37
5.4.420.0770.04719.47
5.4.410.0770.05319.33
5.4.400.0600.05319.13
5.4.390.0600.05319.14
5.4.380.0570.06019.05
5.4.370.0700.06019.00
5.4.360.0630.05019.30
5.4.350.0600.05319.25
5.4.340.0730.06318.85
5.4.320.0600.05719.36
5.4.310.0570.05719.25
5.4.300.0730.04019.27
5.4.290.0700.04319.30
5.4.280.0900.04319.20
5.4.270.0770.05318.97
5.4.260.0730.05719.29
5.4.250.0630.05019.13
5.4.240.0730.06019.04
5.4.230.0800.05018.97
5.4.220.0900.04019.25
5.4.210.0770.05319.20
5.4.200.0800.05019.12
5.4.190.0770.05318.86
5.4.180.0870.05719.27
5.4.170.0700.06019.15
5.4.160.0770.06319.28
5.4.150.0900.04319.12
5.4.140.0800.07016.55
5.4.130.0770.05016.41
5.4.120.0630.05316.43
5.4.110.0770.05016.62
5.4.100.0770.05016.59
5.4.90.0800.04316.29
5.3.290.0670.05314.82
5.3.280.0730.05714.57
5.3.270.0830.05314.84
5.3.260.0800.08014.66
5.3.250.0770.05314.46
5.3.240.1000.06014.61
5.3.230.0700.05714.61
5.3.220.0800.05014.48
5.3.210.0800.05314.47
5.3.200.0900.03714.65
5.3.190.0800.04714.56