1--TEST--
2Test function gzseek() by seeking forward in write mode
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) {
6    print "skip - ZLIB extension not loaded";
7}
8?>
9--FILE--
10<?php
11$f = "gzseek_variation1.gz";
12$h = gzopen($f, 'w');
13$str1 = "This is the first line.";
14$str2 = "This is the second line.";
15gzwrite($h, $str1);
16
17//seek forwards 20 bytes.
18gzseek($h, strlen($str1) + 20);
19gzwrite($h, $str2);
20gzclose($h);
21$h = gzopen($f, 'r');
22echo gzread($h, strlen($str1))."\n";
23var_dump(bin2hex(gzread($h, 20)));
24echo gzread($h, strlen($str2))."\n";
25gzclose($h);
26unlink($f);
27?>
28--EXPECT--
29This is the first line.
30string(40) "0000000000000000000000000000000000000000"
31This is the second line.
32