php-src/Zend/tests/exceptions/exception_handler/exception_handler_004.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

20 lines
521 B
PHP

--TEST--
exception handler tests - 4
--FILE--
<?php
try {
set_exception_handler("fo");
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
set_exception_handler(array("", ""));
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, function "fo" not found or invalid function name
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class "" not found