summaryrefslogtreecommitdiff
path: root/tests/lang/bug26866.phpt
blob: 7761b65d8ab0be853ea8d2ffa8ace34b0e23590e (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
--TEST--
Bug #26866 (segfault when exception raised in __get)
--FILE--
<?php
class bar {
    function get_name() {
        return 'bar';
    }
}
class foo {
    function __get($sName) {
        throw new Exception('Exception!');
        return new bar();
    }
}
$foo = new foo();
try {
    echo $foo->bar->get_name();
}
catch (Exception $E) {
    echo "Exception raised!\n";
}
?>
--EXPECT--
Exception raised!