gzfile_variation7.phpt 853 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. Test function gzfile() by substituting argument 1 with string values.
  3. --EXTENSIONS--
  4. zlib
  5. --FILE--
  6. <?php
  7. $use_include_path = false;
  8. $heredoc = <<<EOT
  9. hello world
  10. EOT;
  11. $variation_array = array(
  12. 'string DQ' => "string",
  13. 'string SQ' => 'string',
  14. 'mixed case string' => "sTrInG",
  15. 'heredoc' => $heredoc
  16. );
  17. foreach ( $variation_array as $var ) {
  18. var_dump(gzfile( $var , $use_include_path ) );
  19. }
  20. ?>
  21. --EXPECTF--
  22. Warning: gzfile(string): Failed to open stream: No such file or directory in %s on line %d
  23. bool(false)
  24. Warning: gzfile(string): Failed to open stream: No such file or directory in %s on line %d
  25. bool(false)
  26. Warning: gzfile(sTrInG): Failed to open stream: No such file or directory in %s on line %d
  27. bool(false)
  28. Warning: gzfile(hello world): Failed to open stream: No such file or directory in %s on line %d
  29. bool(false)