xref: /php-src/ext/opcache/tests/gh8063-003.phpt (revision f39b5c4c)
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?>
25--EXPECTF--
26Autoloading BadClass2
27
28Fatal error: Declaration of BadClass2::dummy() must be compatible with Foo2::dummy(): void in %sBadClass2.inc on line %d
29Autoloading Bar
30Autoloading Baz
31Finished
32