summaryrefslogtreecommitdiff
path: root/Zend/tests/bug43175.phpt
blob: 3bf6befc15b1fc744ff9aef0798e35362fa2213a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #43175 (__destruct() throwing an exception with __call() causes segfault)
--FILE--
<?php

class foobar {
    public function __destruct() {
        throw new Exception();
    }
    public function __call($m, $a) {
        return $this;
    }
}
function foobar() {
    return new foobar();
}
try {
    foobar()->unknown();
} catch (Exception $e) {
    echo "__call via traditional factory should be caught\n";
}
?>
--EXPECT--
__call via traditional factory should be caught