bug47714.phpt 457 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Testing lambda function in set_exception_handler()
  3. --FILE--
  4. <?php
  5. function au($class) {
  6. eval('class handler {
  7. function handle($e) {
  8. echo $e->getMessage()."\n";
  9. }
  10. }');
  11. }
  12. spl_autoload_register('au');
  13. set_exception_handler(function($exception) {
  14. $h = new handler();
  15. $h->handle($exception);
  16. });
  17. throw new Exception('exception');
  18. ?>
  19. --EXPECT--
  20. exception