exit_finally_2.phpt 394 B

1234567891011121314151617181920212223
  1. --TEST--
  2. exit() and finally (2)
  3. --FILE--
  4. <?php
  5. // TODO: In the future, we should execute the finally block.
  6. try {
  7. try {
  8. exit("Exit\n");
  9. } catch (Throwable $e) {
  10. echo "Not caught\n";
  11. } finally {
  12. throw new Exception("Finally exception");
  13. }
  14. echo "Not executed\n";
  15. } catch (Exception $e) {
  16. echo "Caught {$e->getMessage()}\n";
  17. }
  18. ?>
  19. --EXPECT--
  20. Exit