gzgetc_error.phpt 571 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Test function gzgetc() by calling it more than or less than 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. $f = dirname(__FILE__)."/004.txt.gz";
  12. $h = gzopen($f, 'r');
  13. $extra_arg = 'nothing';
  14. var_dump(gzgetc( $h, $extra_arg ) );
  15. var_dump(gzgetc() );
  16. gzclose($h);
  17. ?>
  18. ===DONE===
  19. --EXPECTF--
  20. Warning: gzgetc() expects exactly 1 parameter, 2 given in %s on line %d
  21. bool(false)
  22. Warning: gzgetc() expects exactly 1 parameter, 0 given in %s on line %d
  23. bool(false)
  24. ===DONE===