gh8133.phpt 462 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Enum preloading
  3. --EXTENSIONS--
  4. opcache
  5. --INI--
  6. opcache.enable=1
  7. opcache.enable_cli=1
  8. opcache.optimization_level=-1
  9. opcache.preload={PWD}/gh8133.inc
  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(Foo::CASES);
  17. var_dump(Qux::CASES);
  18. ?>
  19. --EXPECT--
  20. array(2) {
  21. [0]=>
  22. enum(Foo::Bar)
  23. [1]=>
  24. enum(Foo::Baz)
  25. }
  26. array(2) {
  27. [0]=>
  28. enum(Foo::Bar)
  29. [1]=>
  30. enum(Foo::Baz)
  31. }