gzrewind_variation1.phpt 424 B

12345678910111213141516171819202122
  1. --TEST--
  2. Test function gzrewind() by calling it with its expected arguments when writing
  3. --EXTENSIONS--
  4. zlib
  5. --FILE--
  6. <?php
  7. $f = "gzrewind_variation1.txt.gz";
  8. $h = gzopen($f, 'w');
  9. gzwrite($h, 'The first string.');
  10. var_dump(gzrewind($h));
  11. gzwrite($h, 'The second string.');
  12. gzclose($h);
  13. $h = gzopen($f, 'r');
  14. gzpassthru($h);
  15. gzclose($h);
  16. unlink($f);
  17. echo "\n";
  18. ?>
  19. --EXPECT--
  20. bool(false)
  21. The first string.The second string.