exception_handler_004.phpt 521 B

1234567891011121314151617181920
  1. --TEST--
  2. exception handler tests - 4
  3. --FILE--
  4. <?php
  5. try {
  6. set_exception_handler("fo");
  7. } catch (\TypeError $e) {
  8. echo $e->getMessage() . \PHP_EOL;
  9. }
  10. try {
  11. set_exception_handler(array("", ""));
  12. } catch (\TypeError $e) {
  13. echo $e->getMessage() . \PHP_EOL;
  14. }
  15. ?>
  16. --EXPECT--
  17. set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, function "fo" not found or invalid function name
  18. set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class "" not found