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