summaryrefslogtreecommitdiff
path: root/Zend/tests/bug32226.phpt
blob: 9536c921a3335ffb1f6258875c413fe1c619e6e7 (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
35
36
--TEST--
Bug #32226 (SEGV with exception handler on non existing instance)
--FILE--
<?php

class A
{
        public function A()
        {
                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";
}

?>
===DONE===
--EXPECT--
Caught
===DONE===