diff options
author | Stig Bakken <ssb@php.net> | 2002-08-16 00:41:37 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2002-08-16 00:41:37 +0000 |
commit | 04788f9503000845949395a356fbb134ee142fcc (patch) | |
tree | f0555712ea9b11124e6159007fb953292bb8ded0 /tests/lang/035.phpt | |
parent | 197c300860d10cfc6da2284790b291c4363e55f7 (diff) | |
download | php-git-04788f9503000845949395a356fbb134ee142fcc.tar.gz |
@- Added set_exception_handler() function for registering a global,
@ catch-all exception handling function (Stig)
- Added set_exception_handler() function for registering a global,
catch-all exception handling function (Stig)
Diffstat (limited to 'tests/lang/035.phpt')
-rw-r--r-- | tests/lang/035.phpt | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/tests/lang/035.phpt b/tests/lang/035.phpt index e02c243b39..5f22d52cae 100644 --- a/tests/lang/035.phpt +++ b/tests/lang/035.phpt @@ -1,7 +1,21 @@ +--TEST-- +ZE2: set_exception_handler() +--SKIPIF-- +<?php if (version_compare(zend_version(), "2", "<")) print "skip"; ?> +--FILE-- +<?php ----- EXPECTED OUTPUT -test_i -test ----- ACTUAL OUTPUT -test_itest ----- FAILED +set_exception_handler("my_handler"); +try { + throw new exception(); +} catch (stdClass $e) { + print "BAR\n"; +} + +function my_handler($exception) { + print "FOO\n"; +} + +?> +--EXPECT-- +FOO |