--TEST--
Test function gzseek() by calling it with SEEK_SET when writing
--SKIPIF--
<?php 
if (!extension_loaded("zlib")) {
    print 
"skip - ZLIB extension not loaded"
}
?>
--FILE--
<?php
$f 
"temp3.txt.gz";
$h gzopen($f'w'); 
$str1 "This is the first line.";
$str2 "This is the second line.";
gzwrite($h$str1);
echo 
"tell=".gztell($h)."\n";

//seek forwards 20 bytes.
gzseek($hstrlen($str1) + 20SEEK_SET);
echo 
"tell=".gztell($h)."\n";
gzwrite($h$str2);
echo 
"tell=".gztell($h)."\n";
gzclose($h);
echo 
"\nreading the output file\n";
$h gzopen($f'r');
echo 
gzread($hstrlen($str1))."\n";
echo 
var_dump(bin2hex(gzread($h20)));
echo 
gzread($hstrlen($str2))."\n";
gzclose($h);
unlink($f);
?>
===DONE===
--EXPECT--
tell=23
tell=43
tell=67

reading the output file
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===