3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try { //throw new \Exception('aaa'); } catch (\Exception $e) { echo "Caught TestException\n"; } finally { echo $e->getMessage(); }
based on mE87j
Output for 7.0.5 - 7.2.0
Notice: Undefined variable: e in /in/IOg2r on line 10 Fatal error: Uncaught Error: Call to a member function getMessage() on null in /in/IOg2r:10 Stack trace: #0 {main} thrown in /in/IOg2r on line 10
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: e in /in/IOg2r on line 10 Fatal error: Uncaught Error: Call to a member function getMessage() on unknown in /in/IOg2r:10 Stack trace: #0 {main} thrown in /in/IOg2r on line 10
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Undefined variable: e in /in/IOg2r on line 10 Fatal error: Call to a member function getMessage() on null in /in/IOg2r on line 10
Process exited with code 255.
Output for 5.5.24 - 5.5.35
Notice: Undefined variable: e in /in/IOg2r on line 10 Fatal error: Call to a member function getMessage() on a non-object in /in/IOg2r on line 10
Process exited with code 255.
Output for 5.3.19 - 5.4.45
Parse error: syntax error, unexpected '{' in /in/IOg2r on line 9
Process exited with code 255.