bug64353.phpt 838 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Bug #64353 (Built-in classes can be unavailable with dynamic includes and OPcache)
  3. --INI--
  4. allow_url_include=1
  5. opcache.enable=1
  6. opcache.enable_cli=1
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. class BugLoader extends php_user_filter {
  12. public function filter($in, $out, &$consumed, $closing): int {
  13. if (!class_exists("Test")) {
  14. eval("class Test extends ArrayObject {}");
  15. }
  16. while ($bucket = stream_bucket_make_writeable($in)) {
  17. $consumed += $bucket->datalen;
  18. stream_bucket_append($out, $bucket);
  19. }
  20. return PSFS_PASS_ON;
  21. }
  22. }
  23. stream_filter_register('bug.test', 'BugLoader');
  24. include "php://filter/read=bug.test/resource=data://text/plain,<?php\n";
  25. echo "OK\n";
  26. ?>
  27. --EXPECT--
  28. Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
  29. OK