summaryrefslogtreecommitdiff
path: root/tests/lang/035.phpt
blob: 5f22d52cae38012e9e2f8d3cf3b1d7898c8cbde7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
ZE2: set_exception_handler()
--SKIPIF--
<?php if (version_compare(zend_version(), "2", "<")) print "skip"; ?>
--FILE--
<?php

set_exception_handler("my_handler");
try {
    throw new exception();
} catch (stdClass $e) {
    print "BAR\n";
}

function my_handler($exception) {
    print "FOO\n";
}

?>
--EXPECT--
FOO