php-src/tests/lang/bug26866.phpt

26 lines
374 B
Plaintext
Raw Normal View History

2004-02-10 12:58:36 +00:00
--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!