diff options
Diffstat (limited to 'Zend/tests/exception_handler_003.phpt')
-rw-r--r-- | Zend/tests/exception_handler_003.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/exception_handler_003.phpt b/Zend/tests/exception_handler_003.phpt new file mode 100644 index 0000000..137a6ca --- /dev/null +++ b/Zend/tests/exception_handler_003.phpt @@ -0,0 +1,24 @@ +--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"; +?> +--EXPECTF-- +string(17) "Exception thrown!" |