1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/tests/lang/bug26866.phpt
2020-02-03 22:52:20 +01:00

26 lines
410 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!