blob: e8ef8c330fedf2205b9e527dd040d26f8da94e75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--TEST--
Testing lambda function in set_exception_handler()
--FILE--
<?php
function au($class) {
eval('class handler {
function handle($e) {
echo $e->getMessage()."\n";
}
}');
}
function __autoload($class) {
au($class);
}
//spl_autoload_register('au');
set_exception_handler(function($exception) {
$h = new handler();
$h->handle($exception);
});
throw new Exception('exception');
?>
--EXPECT--
exception
|