1--TEST--
2Test function gzeof while writing.
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7
8$filename = __DIR__."/gzeof_variation1.txt.gz";
9$h = gzopen($filename, 'w');
10$str = "Here is the string to be written. ";
11$length = 10;
12gzwrite( $h, $str );
13var_dump(gzeof($h));
14gzwrite( $h, $str, $length);
15var_dump(gzeof($h));
16gzclose($h);
17try {
18    var_dump(gzeof($h));
19} catch (TypeError $e) {
20    echo $e->getMessage(), "\n";
21}
22unlink($filename);
23?>
24--EXPECT--
25bool(false)
26bool(false)
27gzeof(): supplied resource is not a valid stream resource
28