1--TEST-- 2Test function gzread() by calling it while file open for 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 = "gzread_variation1.txt.gz"; 13$h = gzopen($filename, 'w'); 14$str = "Here is the string to be written. "; 15var_dump(gzread($h, 100)); 16gzwrite( $h, $str); 17var_dump(gzread($h, 100)); 18gzrewind($h); 19var_dump(gzread($h, 100)); 20gzclose($h); 21 22$h = gzopen($filename, 'r'); 23gzpassthru($h); 24gzclose($h); 25echo "\n"; 26unlink($filename); 27?> 28--EXPECT-- 29bool(false) 30bool(false) 31bool(false) 32Here is the string to be written. 33