1--TEST-- 2Test function gzwrite() by calling it when file is opened for reading 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__)."/004.txt.gz"; 13$h = gzopen($filename, 'r'); 14$str = b"Here is the string to be written. "; 15$length = 10; 16var_dump(gzwrite( $h, $str ) ); 17var_dump(gzread($h, 10)); 18var_dump(gzwrite( $h, $str, $length ) ); 19gzclose($h); 20 21?> 22===DONE=== 23--EXPECT-- 24int(0) 25string(10) "When you'r" 26int(0) 27===DONE=== 28