gzopen_variation8.phpt 490 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Test gzopen() function : variation: opening a plain file
  3. --EXTENSIONS--
  4. zlib
  5. --FILE--
  6. <?php
  7. echo "*** Testing gzopen() : variation ***\n";
  8. $data = <<<EOT
  9. Here is some plain
  10. text to be read
  11. and displayed.
  12. EOT;
  13. $file = "gzopen_variation8.tmp";
  14. $h = fopen($file, 'w');
  15. fwrite($h, $data);
  16. fclose($h);
  17. $h = gzopen($file, 'r');
  18. gzpassthru($h);
  19. gzclose($h);
  20. echo "\n";
  21. unlink($file);
  22. ?>
  23. --EXPECT--
  24. *** Testing gzopen() : variation ***
  25. Here is some plain
  26. text to be read
  27. and displayed.