blob: 2d180c1a56080e171c2edf423e567045f3309829 (
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
|
--TEST--
Test function readgzfile() 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 = 'readgzfile_temp';
$filename = $dirname.'/plainfile.txt.gz';
mkdir($dirname);
$h = gzopen($filename, 'w');
gzwrite($h, $plaintxt);
gzclose($h);
var_dump(readgzfile( $filename ) );
unlink($filename);
rmdir($dirname);
?>
===DONE===
--EXPECT--
hello world
is a very common test
for all languages
int(52)
===DONE===
|