gzpassthru_basic.phpt 657 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test function gzpassthru() by calling it with its expected arguments
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded("zlib")) {
  6. print "skip - ZLIB extension not loaded";
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. // note that gzpassthru is an alias to fpassthru. parameter checking tests will be
  12. // the same as fpassthru
  13. $f = dirname(__FILE__)."/004.txt.gz";
  14. $h = gzopen($f, 'r');
  15. var_dump(gzpassthru($h));
  16. var_dump(gzpassthru($h));
  17. gzclose($h);
  18. ?>
  19. ===DONE===
  20. --EXPECTF--
  21. When you're taught through feelings
  22. Destiny flying high above
  23. all I know is that you can realize it
  24. Destiny who cares
  25. as it turns around
  26. and I know that it descends down on me
  27. int(176)
  28. int(0)
  29. ===DONE===