3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { throw new Exception("Ouch!"); } catch (Throwable $e) { var_dump($e); }
based on 70fk3
Output for 7.0.0 - 7.2.0
object(Exception)#1 (7) { ["message":protected]=> string(5) "Ouch!" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/D0eht" ["line":protected]=> int(4) ["trace":"Exception":private]=> array(0) { } ["previous":"Exception":private]=> NULL }
Output for 5.3.21 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'Ouch!' in /in/D0eht:4 Stack trace: #0 {main} thrown in /in/D0eht on line 4
Process exited with code 255.