php-src/Zend/tests/exception_handler_003.phpt
2020-02-03 22:52:20 +01:00

25 lines
334 B
PHP

--TEST--
exception handler tests - 3
--FILE--
<?php
class test {
function foo () {
set_exception_handler(array($this, "bar"));
}
function bar($e) {
var_dump(get_class($e)." thrown!");
}
}
$a = new test;
$a->foo();
throw new Exception();
echo "Done\n";
?>
--EXPECT--
string(17) "Exception thrown!"