xref: /php-src/ext/zlib/tests/gzfile_basic2.phpt (revision 74859783)
1--TEST--
2Test function gzfile() reading a plain relative file
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7$plaintxt = <<<EOT
8hello world
9is a very common test
10for all languages
11EOT;
12$dirname = 'gzfile_temp';
13$filename = $dirname.'/gzfile_basic2.txt';
14mkdir($dirname);
15$h = fopen($filename, 'w');
16fwrite($h, $plaintxt);
17fclose($h);
18
19
20var_dump(gzfile( $filename ) );
21
22unlink($filename);
23rmdir($dirname);
24?>
25--EXPECT--
26array(3) {
27  [0]=>
28  string(12) "hello world
29"
30  [1]=>
31  string(22) "is a very common test
32"
33  [2]=>
34  string(17) "for all languages"
35}
36