summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gzeof_variation1.phpt
blob: 4a845917af04de899df3df3854961b6e4222a140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test function gzeof while writing.
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php

$filename = __DIR__."/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)

Warning: gzeof(): supplied resource is not a valid stream resource in %s on line %d
bool(false)
===DONE===