bug70228_5.phpt 308 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #70228 (memleak if return hidden by throw in finally block)
  3. --FILE--
  4. <?php
  5. function test() {
  6. try {
  7. return str_repeat("a", 2);
  8. } finally {
  9. throw new Exception("ops");
  10. }
  11. }
  12. try {
  13. test();
  14. } catch (Exception $e) {
  15. echo $e->getMessage(), "\n";
  16. }
  17. ?>
  18. --EXPECT--
  19. ops