summaryrefslogtreecommitdiff
path: root/Zend/tests/bug47714.phpt
blob: 546da44a86cdbf224581df3dadae70796b001028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Testing lambda function in set_exception_handler()
--FILE--
<?php
function au($class) {
        eval('class handler {
                  function handle($e) {
                      echo $e->getMessage()."\n";
                  }
              }');
}

spl_autoload_register('au');

set_exception_handler(function($exception) {
        $h = new handler();
        $h->handle($exception);
});

throw new Exception('exception');
?>
--EXPECT--
exception