3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class trial{ public $id; public static $sid; public function show(){ if (trial::$sid) echo trial::$sid; else echo $this->id; } } $obj = new trial(); $obj->id = 1; $obj->show(); echo "\n\n"; trial::$sid = 5; echo trial::show();
based on LXdls

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.0120.00616.23
7.2.00.0060.01519.39
7.1.200.0090.00315.70
7.1.100.0060.01217.78
7.1.70.0000.00717.14
7.1.60.0030.02119.13
7.1.50.0140.01016.96
7.1.00.0100.07022.43
7.0.200.0050.00316.46
7.0.60.0100.07019.91
7.0.50.0070.05017.87
7.0.40.0030.04320.40
7.0.30.0570.06720.34
7.0.20.0230.04720.23
7.0.10.0130.06020.33
7.0.00.0070.04020.14
5.6.280.0030.03720.89
5.6.210.0070.05320.78
5.6.200.0070.08318.11
5.6.190.0000.09320.57
5.6.180.4200.03720.61
5.6.170.0270.03320.58
5.6.160.0030.08320.46
5.6.150.0100.07718.21
5.6.140.0070.04018.29
5.6.130.0030.04018.18
5.6.120.0070.04321.04
5.6.110.0130.07721.02
5.6.100.0070.07021.11
5.6.90.0100.04020.96
5.6.80.0030.05320.51
5.6.70.4370.02720.38
5.5.350.0230.07320.34
5.5.340.0100.08017.98
5.5.330.0070.06320.29
5.5.320.0270.05320.31
5.5.310.0230.03720.36
5.5.300.0000.04317.95
5.5.290.0030.08017.99
5.5.280.0030.08320.89
5.5.270.0130.06320.73
5.5.260.0100.08320.96
5.5.250.0200.06320.58
5.5.240.0300.06020.35
5.4.450.0700.08019.46
5.4.440.0700.05319.33
5.4.430.0770.04319.56
5.4.420.0800.05719.32
5.4.410.0730.05719.32
5.4.400.0800.05019.25
5.4.390.0830.05018.83
5.4.380.0830.04319.13
5.4.370.0900.04019.09
5.4.360.0730.05719.08
5.4.350.0830.04718.83
5.4.340.0800.05319.05
5.4.320.0700.06319.08
5.4.310.0870.04319.23
5.4.300.0800.05019.26
5.4.290.0830.04719.00
5.4.280.0770.05719.05
5.4.270.0770.06019.23
5.4.260.0770.05019.24
5.4.250.0800.05319.23
5.4.240.0730.05719.25
5.4.230.0670.04719.33
5.4.220.0700.04719.04
5.4.210.0800.05019.09
5.4.200.0830.04719.23
5.4.190.0830.06719.21
5.4.180.0830.04719.12
5.4.170.0770.05719.33
5.4.160.0830.04319.32
5.4.150.0730.05719.20
5.4.140.0600.05316.46
5.4.130.0800.04716.54
5.4.120.0800.04316.28
5.4.110.0730.05316.28
5.4.100.0800.04316.25
5.4.90.0770.04716.62
5.4.80.0670.05716.63
5.4.70.0070.07016.44
5.4.60.0370.05716.39
5.4.50.0030.06716.47
5.4.40.0130.05716.33
5.4.30.0200.07316.33
5.4.20.0170.03716.48
5.3.290.2370.03314.63
5.3.280.2100.03714.49
5.3.270.2200.04714.57
5.3.260.3300.04014.66
5.3.250.2670.04014.61
5.3.240.1430.04714.69
5.3.230.1430.04314.74
5.3.220.2700.02314.58
5.3.210.0070.03714.65
5.3.200.3630.03714.58
5.3.190.0470.04014.48
5.3.180.2400.05014.57