3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { public function testing($var) { if ($var == 'test') { throw new Exception('broke'); } return true; } } $test = new Test(); try { var_dump($test->testing('test'); } catch (Exception $e) { echo $e->getMessage(); }
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/DuL1f on line 16
Process exited with code 255.