gh8063-002.phpt 682 B

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Bug GH-8063 (Opcache breaks autoloading after E_COMPILE_ERROR) 002
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.record_warnings=1
  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 BadClass();
  21. --EXPECTF--
  22. Autoloading BadClass
  23. Autoloading Foo
  24. Fatal error: Declaration of BadClass::dummy() must be compatible with Foo::dummy(): void in %sBadClass.inc on line 5
  25. Autoloading Bar
  26. Autoloading Baz
  27. Finished