3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public function __construct($a, $b) { var_dump($a, $b); } } class Bar { public function __construct($a) { var_dump($a); } } class Baz { public function __construct($a, $b) { parent::__construct($a, $b); } } $baz = new Baz("foo", "bar");
based on dbc21

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.0070.00716.64
7.2.00.0040.00819.29
7.1.200.0100.00015.55
7.1.100.0070.00417.96
7.1.70.0070.00416.89
7.1.60.0100.01319.21
7.1.50.0040.01216.87
7.1.00.0030.07722.41
7.0.200.0100.00016.69
7.0.60.0070.08321.64
7.0.50.0130.07717.97
7.0.40.0100.08320.25
7.0.30.0470.07720.19
7.0.20.0300.07720.09
7.0.10.0070.08020.11
7.0.00.0030.04320.09
5.6.210.0070.04320.67
5.6.200.0170.06318.24
5.6.190.0030.04320.34
5.6.180.0430.07020.77
5.6.170.0170.05320.51
5.6.160.0130.06020.52
5.6.150.0070.05318.27
5.6.140.0070.08718.27
5.6.130.0030.05318.29
5.6.120.0100.08021.02
5.6.110.0070.08021.12
5.6.100.0330.06321.14
5.6.90.0070.08021.00
5.6.80.0070.07720.39
5.5.350.0170.07020.47
5.5.340.0100.08318.05
5.5.330.0130.03320.31
5.5.320.0170.08320.51
5.5.310.0370.04020.26
5.5.300.0100.07717.95
5.5.290.0030.05317.94
5.5.280.0030.04320.96
5.5.270.0030.08720.80
5.5.260.0030.04320.84
5.5.250.0100.06020.50
5.5.240.0200.05720.24
5.4.450.0700.05019.31
5.4.440.0700.05319.31
5.4.430.0970.04019.52
5.4.420.0870.05019.57
5.4.410.0700.04719.44
5.4.400.0830.05719.09
5.4.390.0600.05719.09
5.4.380.0800.05319.18
5.4.370.0830.05319.23
5.4.360.0670.05319.04
5.4.350.0870.05319.20
5.4.340.0870.04719.30
5.4.320.0970.04718.93
5.4.310.0830.05019.09
5.4.300.0770.05719.09
5.4.290.0630.05319.18
5.4.280.0730.06719.07
5.4.270.0630.05019.30
5.4.260.0730.04719.17
5.4.250.0670.05018.97
5.4.240.0600.05719.18
5.4.230.0630.05319.11
5.4.220.0670.05319.16
5.4.210.0600.05319.30
5.4.200.0570.05719.26
5.4.190.0630.05318.90
5.4.180.0700.04719.20
5.4.170.0670.04719.08
5.4.160.0630.05019.14
5.4.150.0670.05019.16
5.4.140.0700.04316.54
5.4.130.0700.04016.44
5.4.120.0700.04016.49
5.4.110.0630.05016.63
5.4.100.0670.04316.55
5.3.290.0870.04714.70
5.3.280.0730.04014.60
5.3.270.0570.06014.73
5.3.260.0670.05014.62
5.3.250.0570.05714.62
5.3.240.0600.05314.62
5.3.230.0600.05314.73
5.3.220.0670.04714.63
5.3.210.0630.05314.50
5.3.200.0670.04714.69