blob: fd7ba180589b2ef1a550a44ce2ee7e38ad45a600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--TEST--
Test function gzfile() reading a gzip relative file
--SKIPIF--
<?php
if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
?>
--FILE--
<?php
$plaintxt = b<<<EOT
hello world
is a very common test
for all languages
EOT;
$dirname = 'gzfile_temp';
$filename = $dirname.'/plainfile.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);
gzclose($h);
var_dump(gzfile( $filename ) );
unlink($filename);
rmdir($dirname);
?>
===DONE===
--EXPECT--
array(3) {
[0]=>
string(12) "hello world
"
[1]=>
string(22) "is a very common test
"
[2]=>
string(17) "for all languages"
}
===DONE===
|