php-src/Zend/tests/bug55007.phpt

24 lines
586 B
Plaintext
Raw Normal View History

--TEST--
Bug #55007 (compiler fail after previous fail)
--FILE--
<?php
2017-01-31 05:28:17 +08:00
spl_autoload_register(function ($classname) {
if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[]; } }');
if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }');
2017-01-31 05:28:17 +08:00
});
function shutdown() {
new MyErrorHandler();
}
register_shutdown_function('shutdown');
2018-09-17 01:16:42 +08:00
new CompileErrorClass();
?>
--EXPECTF--
Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d
My error handler runs.