php-src/ext/zlib/tests/gzeof_variation1.phpt

32 lines
607 B
Plaintext
Raw Normal View History

--TEST--
Test function gzeof while writing.
--SKIPIF--
2018-10-14 15:23:43 +00:00
<?php
if (!extension_loaded("zlib")) {
2018-10-14 15:23:43 +00:00
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$filename = dirname(__FILE__)."/gzeof_variation1.txt.gz";
$h = gzopen($filename, 'w');
$str = "Here is the string to be written. ";
$length = 10;
gzwrite( $h, $str );
var_dump(gzeof($h));
gzwrite( $h, $str, $length);
var_dump(gzeof($h));
gzclose($h);
var_dump(gzeof($h));
unlink($filename);
?>
===DONE===
--EXPECTF--
bool(false)
bool(false)
2014-05-05 07:51:55 +00:00
Warning: gzeof(): supplied resource is not a valid stream resource in %s on line %d
bool(false)
2014-05-05 07:51:55 +00:00
===DONE===