3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class_exists('Exception') || { class Exception {} } class MyClass { public function __construct() { throw new Exception; } public function __destruct() { echo "destruct\n"; } } try { $a = new MyClass; } catch (Exception $e) {}
Output for 5.3.0 - 5.4.10
Parse error: syntax error, unexpected '{' in /in/Tbbnr on line 2
Process exited with code 255.