1

I was expecting this page to render as the string "TryErrorFinally", but the result is just the string "Try". Do I need to do something else to see the exception generated by calling the non-existent foo() function?

<?php
  try {
    print "Try";
    foo();
  } catch (Exception $e) {
    print "Error";
  } finally {
    print "Finally";
  }
?>
gcbenison
  • 11,723
  • 4
  • 44
  • 82
  • 1
    Trying to call a non-existent foo() method is a "fatal!" error, meaning that it is a non-catcheable error..... it's not an exception.... error !== exception – Mark Baker Mar 13 '16 at 23:04

0 Answers0