xref: /PHP-8.1/Zend/tests/bug55007.phpt (revision 782352c5)
1--TEST--
2Bug #55007 (compiler fail after previous fail)
3--FILE--
4<?php
5
6spl_autoload_register(function ($classname) {
7  if ('CompileErrorClass'==$classname) eval('class CompileErrorClass { function foo() { $a[]; } }');
8  if ('MyErrorHandler'==$classname) eval('class MyErrorHandler { function __construct() { print "My error handler runs.\n"; } }');
9});
10
11function shutdown() {
12  new MyErrorHandler();
13}
14
15
16register_shutdown_function('shutdown');
17
18new CompileErrorClass();
19
20?>
21--EXPECTF--
22Fatal error: Cannot use [] for reading in %s(%d) : eval()'d code on line %d
23My error handler runs.
24