xref: /PHP-8.3/ext/opcache/tests/gh8063-003.phpt (revision f20e11cb)
1--TEST--
2Bug GH-8063 (Opcache breaks autoloading after E_COMPILE_ERROR) 003
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.record_warnings=0
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11
12spl_autoload_register(function ($class) {
13    printf("Autoloading %s\n", $class);
14    include __DIR__.DIRECTORY_SEPARATOR.'gh8063'.DIRECTORY_SEPARATOR.$class.'.inc';
15});
16
17register_shutdown_function(function () {
18    new Bar();
19    new Baz();
20    print "Finished\n";
21});
22
23new BadClass2();
24--EXPECTF--
25Autoloading BadClass2
26
27Fatal error: Declaration of BadClass2::dummy() must be compatible with Foo2::dummy(): void in %sBadClass2.inc on line %d
28Autoloading Bar
29Autoloading Baz
30Finished
31