preload_bug79114.phpt 550 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #79114 (Eval class during preload causes class to be only half available)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. opcache.preload={PWD}/preload.inc
  8. --EXTENSIONS--
  9. opcache
  10. --SKIPIF--
  11. <?php
  12. if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
  13. ?>
  14. --FILE--
  15. <?php
  16. var_dump(class_exists(Foo::class));
  17. var_dump(class_exists(Bar::class));
  18. new Bar();
  19. var_dump(class_parents('Bar'));
  20. new Foo();
  21. f3();
  22. ?>
  23. --EXPECT--
  24. bool(true)
  25. bool(true)
  26. array(1) {
  27. ["Foo"]=>
  28. string(3) "Foo"
  29. }