mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
28 lines
513 B
PHP
28 lines
513 B
PHP
--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===
|