mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
26 lines
374 B
PHP
26 lines
374 B
PHP
--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!
|