bug72213.phpt 407 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #72213 (Finally leaks on nested exceptions)
  3. --FILE--
  4. <?php
  5. function test() {
  6. try {
  7. throw new Exception('a');
  8. } finally {
  9. try {
  10. throw new Exception('b');
  11. } finally {
  12. }
  13. }
  14. }
  15. try {
  16. test();
  17. } catch (Exception $e) {
  18. var_dump($e->getMessage());
  19. var_dump($e->getPrevious()->getMessage());
  20. }
  21. ?>
  22. --EXPECT--
  23. string(1) "b"
  24. string(1) "a"