readgzfile_variation5.phpt 898 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. Test function readgzfile() by substituting argument 1 with int values.
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
  6. ?>
  7. --FILE--
  8. <?php
  9. $use_include_path = false;
  10. $variation = array (
  11. 'int 0' => 0,
  12. 'int 1' => 1,
  13. 'int 12345' => 12345,
  14. 'int -12345' => -2345,
  15. );
  16. foreach ( $variation as $var ) {
  17. var_dump(readgzfile( $var , $use_include_path ) );
  18. }
  19. ?>
  20. ===DONE===
  21. --EXPECTF--
  22. Warning: readgzfile(0): failed to open stream: No such file or directory in %s on line %d
  23. bool(false)
  24. Warning: readgzfile(1): failed to open stream: No such file or directory in %s on line %d
  25. bool(false)
  26. Warning: readgzfile(12345): failed to open stream: No such file or directory in %s on line %d
  27. bool(false)
  28. Warning: readgzfile(-2345): failed to open stream: No such file or directory in %s on line %d
  29. bool(false)
  30. ===DONE===