xref: /php-src/ext/opcache/tests/gh8063-001.phpt (revision f39b5c4c)
1--TEST--
2Bug GH-8063 (Opcache breaks autoloading after E_COMPILE_ERROR) 001
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 BadClass();
24?>
25--EXPECTF--
26Autoloading BadClass
27Autoloading Foo
28
29Fatal error: Declaration of BadClass::dummy() must be compatible with Foo::dummy(): void in %sBadClass.inc on line 5
30Autoloading Bar
31Autoloading Baz
32Finished
33