1--TEST-- 2Test function gzeof while writing. 3--SKIPIF-- 4<?php 5if (!extension_loaded("zlib")) { 6 print "skip - ZLIB extension not loaded"; 7} 8?> 9--FILE-- 10<?php 11 12$filename = dirname(__FILE__)."/temp.txt.gz"; 13$h = gzopen($filename, 'w'); 14$str = "Here is the string to be written. "; 15$length = 10; 16gzwrite( $h, $str ); 17var_dump(gzeof($h)); 18gzwrite( $h, $str, $length); 19var_dump(gzeof($h)); 20gzclose($h); 21var_dump(gzeof($h)); 22unlink($filename); 23?> 24===DONE=== 25--EXPECTF-- 26bool(false) 27bool(false) 28 29Warning: gzeof(): %d is not a valid stream resource in %s on line %d 30bool(false) 31===DONE===