1--TEST--
2Test function gzread() by calling it while file open for writing
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7
8$filename = "gzread_variation1.txt.gz";
9$h = gzopen($filename, 'w');
10$str = "Here is the string to be written. ";
11var_dump(gzread($h, 100));
12gzwrite( $h, $str);
13var_dump(gzread($h, 100));
14gzrewind($h);
15var_dump(gzread($h, 100));
16gzclose($h);
17
18$h = gzopen($filename, 'r');
19gzpassthru($h);
20gzclose($h);
21echo "\n";
22unlink($filename);
23?>
24--EXPECT--
25bool(false)
26bool(false)
27bool(false)
28Here is the string to be written.
29