diff options
Diffstat (limited to 'Zend/tests/bug49908.phpt')
-rw-r--r-- | Zend/tests/bug49908.phpt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Zend/tests/bug49908.phpt b/Zend/tests/bug49908.phpt index 99b1a40e3d..2f33080258 100644 --- a/Zend/tests/bug49908.phpt +++ b/Zend/tests/bug49908.phpt @@ -3,7 +3,7 @@ Bug #49908 (throwing exception in __autoload crashes when interface is not defin --FILE-- <?php -function __autoload($className) { +spl_autoload_register(function ($className) { var_dump($className); if ($className == 'Foo') { @@ -11,18 +11,20 @@ function __autoload($className) { } else { throw new Exception($className); } -} +}); new Foo; ?> --EXPECTF-- -%unicode|string%(3) "Foo" -%unicode|string%(3) "Bar" +string(3) "Foo" +string(3) "Bar" Fatal error: Uncaught Exception: Bar in %s:%d Stack trace: -#0 %s(7): __autoload('Bar') -#1 %s(13): __autoload('Foo') -#2 {main} +#0 [internal function]: {closure}('Bar') +#1 %s(%d): spl_autoload_call('Bar') +#2 [internal function]: {closure}('Foo') +#3 %s(%d): spl_autoload_call('Foo') +#4 {main} thrown in %s on line %d |