mirror of
https://github.com/php/php-src.git
synced 2024-10-04 16:26:13 +00:00
6d8760677d
- altered EXPECT for parser errors. This may or may not be a Good Thing.
25 lines
311 B
PHP
25 lines
311 B
PHP
--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";
|
|
?>
|
|
--EXPECT--
|
|
unicode(17) "Exception thrown!"
|