3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { public function __construct() { throw new Exception('Can\'t construct...'); } } echo new Foo;
based on eBJa9
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: Can't construct... in /in/usDm3:8 Stack trace: #0 /in/usDm3(13): foo->__construct() #1 {main} thrown in /in/usDm3 on line 8
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'Can't construct...' in /in/usDm3:8 Stack trace: #0 /in/usDm3(13): foo->__construct() #1 {main} thrown in /in/usDm3 on line 8
Process exited with code 255.