3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php #file: Router/Exception.php namespace Router { interface Exception {} } #file: Router/Exception/NotFound.php namespace Router\Exception { class NotFound extends \NoticeException implements \Router\Exception {} } #file: index.php // now you can catch your exceptions either by the SPL type but also by component try { throw new \Router\Exception\NotFound; } catch (\Router\Exception $e) { var_dump(1, $e); } catch (\NoticeException $e) { var_dump(2, $e); };

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.0.10.0100.07320.08
7.0.00.0070.05020.30
5.6.160.0030.08720.52
5.6.150.0070.04018.19
5.6.140.0070.07018.12
5.6.130.0100.08718.18
5.6.120.0130.07021.14
5.6.110.0030.08721.01
5.6.100.0070.04720.99
5.6.90.0030.07721.03
5.6.80.0100.08020.48
5.5.300.0000.05017.97
5.5.290.0000.04717.94
5.5.280.0070.04020.94
5.5.270.0100.06720.76
5.5.260.0000.07020.86
5.5.250.0000.09020.61
5.5.240.0170.06720.36
5.4.450.0100.07319.61
5.4.440.0130.06719.51
5.4.430.0370.03719.61
5.4.420.0270.05019.45
5.4.410.0270.05319.48
5.4.400.0270.05019.07
5.4.390.0230.05318.89
5.4.380.0270.05019.20
5.4.370.0230.05019.21
5.4.360.0230.05019.18
5.4.350.0200.05319.18
5.4.340.0100.06319.19
5.4.320.0170.05719.13
5.4.310.0230.04719.16
5.4.300.0200.06319.12
5.4.290.0270.05019.05
5.4.280.0230.05319.28
5.4.270.0200.05318.90
5.4.260.0130.05719.18
5.4.250.0230.05019.12
5.4.240.0130.06019.28
5.4.230.0300.04718.90
5.4.220.0270.05319.27
5.4.210.0200.05319.12
5.4.200.0270.05019.20
5.4.190.0270.04319.28
5.4.180.0200.05719.08
5.4.170.0170.06018.88
5.4.160.0230.04719.20
5.4.150.0230.05319.17
5.4.140.0230.04716.50
5.4.130.0200.04716.53
5.4.120.0200.04716.54
5.4.110.0070.06316.68
5.3.290.0270.04714.73
5.3.280.0170.05714.48
5.3.270.0170.06014.59
5.3.260.0170.05714.67
5.3.250.0170.05314.62
5.3.240.0200.05014.48
5.3.230.0200.05014.61
5.3.220.0230.05714.59
5.3.210.0230.05014.63