3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Dog { public function woof(); } class Terrier implements Dog { public function woof() { echo 'woof'; } } class Staffie extends Terrier { } $dog = new Staffie(); theBestDog($dog); function theBestDog(Dog $dog){ echo 'The best dogs is ' . get_class_name($dog); $dog->woof(); }

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.00316.71
7.2.00.0080.01219.48
7.1.200.0070.00715.59
7.1.70.0040.00817.13
7.1.60.0110.00417.21
7.1.50.0100.00617.00
7.1.40.0000.01316.76
7.1.30.0000.01716.76
7.1.20.0130.00416.76
7.1.10.0040.00916.76
7.1.00.0000.00816.76
7.0.200.0090.00316.76
7.0.190.0060.00616.76
7.0.180.0000.01316.76
7.0.170.0060.00616.76
7.0.160.0040.00816.76
7.0.150.0090.00516.76
7.0.140.0040.00816.76
7.0.130.0060.00816.76
7.0.120.0060.00616.76
7.0.110.0000.01316.76
7.0.100.0050.00716.76
7.0.90.0100.00616.76
7.0.80.0080.00816.76
7.0.70.0090.00416.76
7.0.60.0000.01316.76
7.0.50.0070.00716.76
7.0.40.0110.01116.76
7.0.30.0100.00416.76
7.0.20.0000.01116.76
7.0.10.0060.00616.76
7.0.00.0000.00716.76
hhvm-3.17.30.0490.07697.44
hhvm-3.15.40.0380.11796.52
hhvm-3.13.20.0340.090100.51
hhvm-3.12.140.0230.03275.82
hhvm-3.11.10.0360.09593.95
hhvm-3.10.10.0540.09590.09
5.6.300.0140.04220.93
5.6.290.0090.05620.89
5.6.280.0000.05020.86
5.6.270.0100.07020.92
5.6.260.0140.03821.08
5.6.250.0070.05520.76
5.6.240.0040.05820.98
5.6.230.0070.04720.78
5.6.220.0100.04020.84
5.6.210.0030.04520.80
5.6.200.0130.03920.95
5.6.190.0070.04620.87
5.6.180.0140.03220.74
5.6.170.0070.05420.94
5.6.160.0070.03620.97
5.6.150.0030.04321.04
5.6.140.0030.04920.81
5.6.130.0130.05020.74
5.6.120.0030.04020.82
5.6.110.0070.05221.02
5.6.100.0070.04321.01
5.6.90.0030.04920.71
5.6.80.0100.03520.25
5.6.70.0070.03420.24
5.6.60.0070.04020.20
5.6.50.0030.05920.32
5.6.40.0060.03820.41
5.6.30.0070.04020.29
5.6.20.0000.04620.10
5.6.10.0000.04220.18
5.6.00.0030.03820.27
5.5.380.0030.04217.62
5.5.370.0000.04717.41
5.5.360.0040.04417.57
5.5.350.0060.04117.56
5.5.340.0030.04318.08
5.5.330.0100.03318.01
5.5.320.0070.04018.08
5.5.310.0070.04218.12
5.5.300.0090.03618.00
5.5.290.0070.05618.10
5.5.280.0000.05317.84
5.5.270.0040.04718.14
5.5.260.0030.04418.07
5.5.250.0000.04217.90
5.5.240.0000.04217.49
5.5.230.0030.03717.46
5.5.220.0030.04517.08
5.5.210.0060.03617.47
5.5.200.0060.03517.21
5.5.190.0060.03917.21
5.5.180.0060.03917.36
5.5.160.0060.03617.45
5.5.150.0100.04317.41
5.5.140.0210.03917.05
5.5.130.0100.03717.43
5.5.120.0030.03717.44
5.5.110.0030.03817.20
5.5.100.0000.04017.12
5.5.90.0040.03917.34
5.5.80.0030.03816.99
5.5.70.0040.04317.10
5.5.60.0030.08017.31
5.5.50.0090.03417.33
5.5.40.0100.03217.34
5.5.30.0000.04417.39
5.5.20.0120.04417.22
5.5.10.0000.04617.33
5.5.00.0000.04917.31
5.4.450.0130.03819.46
5.4.440.0040.03919.28
5.4.430.0030.04519.38
5.4.420.0060.03919.24
5.4.410.0040.04019.16
5.4.400.0030.04018.96
5.4.390.0060.04119.13
5.4.380.0110.02819.20
5.4.370.0070.04618.90
5.4.360.0070.04719.06
5.4.350.0040.04019.00
5.4.340.0030.04318.96
5.4.320.0030.03718.91
5.4.310.0000.04318.97
5.4.300.0100.03419.20
5.4.290.0000.04518.98
5.4.280.0030.04519.13
5.4.270.0000.04018.89
5.4.260.0030.04018.89
5.4.250.0030.04419.02
5.4.240.0030.04219.20
5.4.230.0060.03418.97
5.4.220.0060.06419.06
5.4.210.0060.03619.04
5.4.200.0030.04218.95
5.4.190.0070.03419.12
5.4.180.0070.03619.04
5.4.170.0030.04418.96
5.4.160.0030.03719.22
5.4.150.0130.03818.93
5.4.140.0000.04916.76
5.4.130.0090.03116.76
5.4.120.0000.03716.76
5.4.110.0040.03716.76
5.4.100.0000.04916.76
5.4.90.0060.03716.76
5.4.80.0070.03716.78
5.4.70.0000.04016.78
5.4.60.0000.04316.76
5.4.50.0040.04316.76
5.4.40.0030.04016.76
5.4.30.0030.03716.76
5.4.20.0060.03316.76
5.4.10.0030.03816.76
5.4.00.0000.03916.76
5.3.290.0000.04616.76
5.3.280.0030.03816.76
5.3.270.0090.03116.76
5.3.260.0030.04116.76
5.3.250.0070.03116.76
5.3.240.0060.03216.76
5.3.230.0040.03916.76
5.3.220.0060.03416.76
5.3.210.0070.04316.76
5.3.200.0110.04216.76
5.3.190.0070.03716.76
5.3.180.0060.03616.76
5.3.170.0060.03816.76
5.3.160.0070.03916.76
5.3.150.0030.03816.76
5.3.140.0000.04116.76
5.3.130.0030.04716.76
5.3.120.0000.04416.76
5.3.110.0100.03916.76
5.3.100.0160.02516.76
5.3.90.0090.03716.76
5.3.80.0030.04716.76
5.3.70.0100.03316.76
5.3.60.0040.04316.76
5.3.50.0000.04316.76
5.3.40.0060.04116.76
5.3.30.0070.03616.76
5.3.20.0030.04116.76
5.3.10.0070.03716.76
5.3.00.0030.04516.76
5.2.170.0160.02016.76
5.2.160.0000.03216.76
5.2.150.0100.02416.76
5.2.140.0060.03416.76
5.2.130.0030.03116.76
5.2.120.0000.03616.76
5.2.110.0030.03116.76
5.2.100.0030.03116.76
5.2.90.0030.02816.76
5.2.80.0000.03316.76
5.2.70.0000.03416.76
5.2.60.0000.03316.76
5.2.50.0060.02816.76
5.2.40.0070.03016.76
5.2.30.0000.03116.76
5.2.20.0000.03316.76
5.2.10.0140.03816.76
5.2.00.0090.02416.76
5.1.60.0030.02616.76
5.1.50.0000.02816.76
5.1.40.0080.02316.76
5.1.30.0040.02616.76
5.1.20.0060.02416.76
5.1.10.0070.02516.76
5.1.00.0000.02816.76
5.0.50.0040.02016.76
5.0.40.0040.01916.76
5.0.30.0040.03216.76
5.0.20.0000.02416.76
5.0.10.0030.02116.76
5.0.00.0090.02516.76
4.4.90.0030.01416.76
4.4.80.0000.01716.76
4.4.70.0000.01716.76
4.4.60.0030.01416.76
4.4.50.0040.01816.76
4.4.40.0000.02816.76
4.4.30.0000.01916.76
4.4.20.0000.02016.76
4.4.10.0050.01316.76
4.4.00.0030.02416.76
4.3.110.0000.02016.76
4.3.100.0030.01316.76
4.3.90.0140.00716.76
4.3.80.0000.02716.76
4.3.70.0030.01316.76
4.3.60.0000.02216.76
4.3.50.0030.02016.76
4.3.40.0000.02916.76
4.3.30.0000.02016.76
4.3.20.0030.01616.76
4.3.10.0000.02016.76
4.3.00.0080.02316.76