bind_static_exception.phpt 293 B

123456789101112131415161718
  1. --TEST--
  2. BIND_STATIC may destroy a variable with a throwing destructor
  3. --FILE--
  4. <?php
  5. class Test {
  6. function __destruct() {
  7. throw new Exception("Foo");
  8. }
  9. }
  10. try {
  11. $new = new Test;
  12. static $new;
  13. } catch (Exception $e) {
  14. echo $e->getMessage(), "\n";
  15. }
  16. ?>
  17. --EXPECT--
  18. Foo