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 = dirname(__FILE__)."/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===DONE=== 29--EXPECTF-- 30move 40 bytes 31tell=int(40) 32move to the end 33 34Warning: gzseek(): SEEK_END is not supported in %s on line %d 35int(-1) 36tell=int(40) 37eof=bool(false) 38string(10) "iny flying" 39===DONE===