issue0149.phpt 973 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. ISSUE #149 (Phar mount points not working this OPcache enabled)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. phar.readonly=0
  7. --EXTENSIONS--
  8. opcache
  9. phar
  10. --CONFLICTS--
  11. server
  12. --FILE--
  13. <?php
  14. $stub = "<?php header('Content-Type: text/plain;');
  15. Phar::mount('this.file', '". __FILE__ . "');
  16. echo 'OK\n';
  17. __HALT_COMPILER(); ?>";
  18. $p = new Phar(__DIR__ . '/issue0149.phar.php', 0, 'this');
  19. $p['index.php'] = ""; # A Phar must have at least one file, hence this dummy
  20. $p->setStub($stub);
  21. unset($p);
  22. include "php_cli_server.inc";
  23. php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d extension=phar.'.PHP_SHLIB_SUFFIX);
  24. echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');
  25. echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');
  26. echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/issue0149.phar.php');
  27. ?>
  28. --CLEAN--
  29. <?php
  30. @unlink(__DIR__ . '/issue0149.phar.php');
  31. ?>
  32. --EXPECT--
  33. OK
  34. OK
  35. OK