php-src/Zend/tests/exception_handler_001.phpt

21 lines
254 B
Plaintext
Raw Normal View History

2007-05-06 05:44:52 +08:00
--TEST--
exception handler tests - 1
--FILE--
<?php
set_exception_handler("foo");
function foo($e) {
2020-02-04 05:52:20 +08:00
var_dump(get_class($e)." thrown!");
2007-05-06 05:44:52 +08:00
}
class test extends Exception {
}
throw new test();
echo "Done\n";
?>
2018-09-17 01:16:42 +08:00
--EXPECT--
2007-05-06 05:44:52 +08:00
string(12) "test thrown!"