1--TEST--
2Test function gzseek() by calling it with SEEK_END when reading
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7$f = __DIR__."/004.txt.gz";
8$h = gzopen($f, 'r');
9// move 40 bytes
10echo "move 40 bytes\n";
11gzread($h, 40);
12echo "tell=";
13var_dump(gztell($h));
14echo "move to the end\n";
15var_dump(gzseek( $h, 0, SEEK_END ) );
16echo "tell=";
17var_dump(gztell($h));
18echo "eof=";
19var_dump(gzeof($h));
20//read the next 10
21var_dump(gzread($h, 10));
22gzclose($h);
23?>
24--EXPECTF--
25move 40 bytes
26tell=int(40)
27move to the end
28
29Warning: gzseek(): SEEK_END is not supported in %s on line %d
30int(-1)
31tell=int(40)
32eof=bool(false)
33string(10) "iny flying"
34