summaryrefslogtreecommitdiff
path: root/Zend/tests/bug32226.phpt
blob: f56f06f107f30b154b3448c55f0346a20e9a1d84 (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
25
26
27
28
29
30
31
32
33
34
--TEST--
Bug #32226 (SEGV with exception handler on non existing instance)
--FILE--
<?php

class A
{
        public function __construct()
        {
                set_exception_handler(array($this, 'EH'));

                throw new Exception();
        }

        public function EH()
        {
                restore_exception_handler();

                throw new Exception();
        }
}

try
{
$a = new A();
}
catch(Exception $e)
{
    echo "Caught\n";
}

?>
--EXPECT--
Caught