1--TEST--
2Test function gzwrite() by calling it when file is opened for reading
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7
8$filename = __DIR__."/004.txt.gz";
9$h = gzopen($filename, 'r');
10$str = "Here is the string to be written. ";
11$length = 10;
12var_dump(gzwrite( $h, $str ) );
13var_dump(gzread($h, 10));
14var_dump(gzwrite( $h, $str, $length ) );
15gzclose($h);
16
17?>
18--EXPECT--
19int(0)
20string(10) "When you'r"
21int(0)
22