3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo\Bar; class Bar {} namespace Foo\Baz; use Foo\Bar; class Baz { public function __construct(){ $str1 = "Bar"; $str2 = "\\Foo\\Bar"; $a = new \Foo\Bar; var_dump($a); } } $baz = new Baz();
based on km8TV

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.10.0030.00716.49
7.3.00.0040.00816.54
7.2.130.0000.01116.83
7.2.120.0030.00916.75
7.2.110.0080.00416.63
7.2.100.0060.00316.46
7.2.90.0000.01516.92
7.2.80.0000.00916.76
7.2.70.0150.00016.48
7.2.60.0110.00416.65
7.2.50.0040.00816.67
7.2.40.0000.00916.88
7.2.30.0070.00716.80
7.2.20.0070.01016.42
7.2.10.0060.01016.70
7.2.00.0050.00818.17
7.1.250.0070.00015.45
7.1.200.0070.00315.59
7.1.100.0040.00817.95
7.1.70.0000.00816.86
7.1.60.0060.01919.12
7.1.50.0030.01416.86
7.1.00.0130.06722.30
7.0.200.0050.00516.21
7.0.60.0030.09019.78
7.0.50.0030.05017.79
7.0.40.0100.07720.27
7.0.30.0230.04320.23
7.0.20.0270.03720.16
7.0.10.0030.09320.18
7.0.00.0000.04320.38
5.6.280.0030.04021.03
5.6.210.0070.08320.59
5.6.200.0100.05718.18
5.6.190.0000.05020.62
5.6.180.0170.05020.64
5.6.170.0130.04320.54
5.6.160.0000.07720.43
5.6.150.0070.08018.12
5.6.140.0000.04018.24
5.6.130.0030.05718.23
5.6.120.0070.08020.90
5.6.110.0100.04321.11
5.6.100.0100.05021.01
5.6.90.0170.07321.00
5.6.80.0030.08320.39
5.5.350.2870.04720.45
5.5.340.0130.06017.94
5.5.330.0130.07720.43
5.5.320.0000.08720.51
5.5.310.0200.04020.27
5.5.300.0130.07317.95
5.5.290.0170.07017.95
5.5.280.0030.08720.77
5.5.270.0030.08020.90
5.5.260.0030.04020.85
5.5.250.0000.04320.50
5.5.240.0300.06020.27
5.4.450.0800.06319.33
5.4.440.0730.06319.29
5.4.430.0700.05719.58
5.4.420.0930.05319.42
5.4.410.0800.04719.19
5.4.400.0630.06018.97
5.4.390.0700.05318.95
5.4.380.0870.05319.26
5.4.370.0700.05319.37
5.4.360.0800.04718.84
5.4.350.0930.05019.28
5.4.340.0770.04719.37
5.4.320.0870.06719.13
5.4.310.0900.05319.10
5.4.300.0930.04719.37
5.4.290.0830.06019.36
5.4.280.0770.05018.89
5.4.270.0730.04719.27
5.4.260.0670.05318.98
5.4.250.0700.05719.29
5.4.240.0770.05719.10
5.4.230.0630.06319.36
5.4.220.0970.05719.29
5.4.210.0930.05319.12
5.4.200.0900.05319.28
5.4.190.0670.05319.09
5.4.180.0670.05319.25
5.4.170.0770.04318.83
5.4.160.0100.05019.26
5.4.150.0130.05019.27
5.4.140.0700.04716.41
5.4.130.0700.04716.38
5.4.120.0670.05016.53
5.4.110.0870.05016.46
5.4.100.0800.04316.30
5.4.90.0870.05016.21
5.3.290.0730.06014.64
5.3.280.0800.04714.64
5.3.270.0670.05714.67
5.3.260.0230.05314.71
5.3.250.0300.04714.75
5.3.240.0670.05014.88
5.3.230.0700.05014.52
5.3.220.0770.05014.63
5.3.210.0770.04714.49
5.3.200.0770.04314.52
5.3.190.0900.05314.49