gh8063-003.phpt 672 B

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