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