summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gztell_basic.phpt
blob: 7d7e96d341fb75c936dc186be52524528c040b5a (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 gztell() by calling it with its expected arguments when reading
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$f = dirname(__FILE__)."/004.txt.gz";
$h = gzopen($f, 'r');
$intervals = array(7, 22, 54, 17, 27, 15, 1000);
// tell should be 7, 29, 83, 100, 127, 142, 176 (176 is length of uncompressed file)

var_dump(gztell($h));
foreach ($intervals as $interval) {
   gzread($h, $interval);
   var_dump(gztell($h));
}

gzclose($h);
?>
===DONE===
--EXPECT--
int(0)
int(7)
int(29)
int(83)
int(100)
int(127)
int(142)
int(176)
===DONE===