summaryrefslogtreecommitdiff
path: root/tests/lang/bug26866.phpt
blob: abb99c34fd1e0c6da112d47f1cec0d3833355212 (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!