3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo ($firstname) { if (!$firstname) { throw new \Exception('Division par zéro.'); } } try { foo(null); }catch (\Exeption $e ) { var_dump($e); }
Output for 7.1.7
Fatal error: Uncaught Exception: Division par zéro. in /in/ShfkO:5 Stack trace: #0 /in/ShfkO(11): foo(NULL) #1 {main} thrown in /in/ShfkO on line 5
Process exited with code 255.