try_finally_026.phpt 556 B

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Throw in finally inside catch inside finally
  3. --FILE--
  4. <?php
  5. function test() {
  6. try {
  7. throw new Exception(1);
  8. } finally {
  9. try {
  10. throw new Exception(2);
  11. } catch (Exception $e) {
  12. try {
  13. } finally {
  14. throw new Exception(3);
  15. }
  16. }
  17. }
  18. }
  19. try {
  20. test();
  21. } catch (Exception $e) {
  22. echo $e, "\n";
  23. }
  24. ?>
  25. --EXPECTF--
  26. Exception: 1 in %s:%d
  27. Stack trace:
  28. #0 %s(%d): test()
  29. #1 {main}
  30. Next Exception: 3 in %s:%d
  31. Stack trace:
  32. #0 %s(%d): test()
  33. #1 {main}