php-src/Zend/tests/exceptions/exception_handler/exception_handler_003.phpt
DanielEScherzer babf7a32bf
Zend/tests: organize some tests with sub directories (10) (#17920)
Add directories for tests relating to
- halting the compiler
- `declare()` usage
- exception handlers
- `get_class_methods()`
- `get_class_vars()`
- `isset()`
- name collisions

As well as organizing a couple of tests into existing sub directories along the
way

Work towards GH-15631
2025-02-25 09:48:52 +00:00

24 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!"