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