mirror of
https://github.com/php/php-src.git
synced 2026-03-25 16:52:18 +01:00
Add directories for tests relating to - halting the compiler - `declare()` usage - exception handlers - `get_class_methods()` - `get_class_vars()` - `isset()` - name collisions As well as organizing a couple of tests into existing sub directories along the way Work towards GH-15631
24 lines
457 B
PHP
24 lines
457 B
PHP
--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
|