3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Destructable { function __destruct() { echo "Goodbye!\n"; } } function throwaway($anything) { throw new Exception; ) $stored_exception = null; try { $raii = new Destructable; throwaway( $raii ); } catch ( Exception $e ) { echo "Caught!\n"; $stored_exception = $e; } echo "Unsetting...\n"; unset($caught_exception);
Output for 5.3.0 - 5.5.4
Parse error: syntax error, unexpected ')' in /in/7gmEi on line 5
Process exited with code 255.