readgzfile_variation7.phpt 987 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --TEST--
  2. Test function readgzfile() by substituting argument 1 with string 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. $heredoc = <<<EOT
  11. hello world
  12. EOT;
  13. $variation_array = array(
  14. 'string DQ' => "string",
  15. 'string SQ' => 'string',
  16. 'mixed case string' => "sTrInG",
  17. 'heredoc' => $heredoc
  18. );
  19. foreach ( $variation_array as $var ) {
  20. var_dump(readgzfile( $var , $use_include_path ) );
  21. }
  22. ?>
  23. ===DONE===
  24. --EXPECTF--
  25. Warning: readgzfile(string): failed to open stream: No such file or directory in %s on line %d
  26. bool(false)
  27. Warning: readgzfile(string): failed to open stream: No such file or directory in %s on line %d
  28. bool(false)
  29. Warning: readgzfile(sTrInG): failed to open stream: No such file or directory in %s on line %d
  30. bool(false)
  31. Warning: readgzfile(hello world): failed to open stream: No such file or directory in %s on line %d
  32. bool(false)
  33. ===DONE===