summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gzrewind_variation1.phpt
blob: 4d78fe6ed060dbea05ef494d2439e5c507f858e1 (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
--TEST--
Test function gzrewind() by calling it with its expected arguments when writing
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$f = "temp2.txt.gz";
$h = gzopen($f, 'w');
gzwrite($h, b'The first string.');
var_dump(gzrewind($h));
gzwrite($h, b'The second string.');
gzclose($h);

$h = gzopen($f, 'r');
gzpassthru($h);
gzclose($h);
unlink($f);
echo "\n";
?>
===DONE===
--EXPECT--
bool(false)
The first string.The second string.
===DONE===