stream_001.phpt 671 B

123456789101112131415161718192021222324
  1. --TEST--
  2. stream_wrapper_unregister() & stream_wrapper_restore()
  3. --FILE--
  4. <?php
  5. var_dump(stream_wrapper_unregister('file'));
  6. var_dump(fopen("file://".__FILE__, "r"));
  7. var_dump(stream_wrapper_restore('file'));
  8. var_dump(fopen("file://".__FILE__, "r"));
  9. echo "Done\n";
  10. ?>
  11. --EXPECTF--
  12. bool(true)
  13. Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configured PHP? in %s on line %d
  14. Warning: fopen(): file:// wrapper is disabled in the server configuration in %s on line %d
  15. Warning: fopen(file://%s): Failed to open stream: no suitable wrapper could be found in %s on line %d
  16. bool(false)
  17. bool(true)
  18. resource(%d) of type (stream)
  19. Done