You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
486 B

  1. --TEST--
  2. Bug #43175 (__destruct() throwing an exception with __call() causes segfault)
  3. --FILE--
  4. <?php
  5. class foobar {
  6. public function __destruct() {
  7. throw new Exception();
  8. }
  9. public function __call($m, $a) {
  10. return $this;
  11. }
  12. }
  13. function foobar() {
  14. return new foobar();
  15. }
  16. try {
  17. foobar()->unknown();
  18. } catch (Exception $e) {
  19. echo "__call via traditional factory should be caught\n";
  20. }
  21. ?>
  22. --EXPECT--
  23. __call via traditional factory should be caught