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";
  }
?>
1
  • 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
    Commented Mar 13, 2016 at 23:04

0

Browse other questions tagged or ask your own question.