3v4l.org

run code in 300+ PHP versions simultaneously
<?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).

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

preferences:
142.43 ms | 1394 KiB | 7 Q