xref: /php-src/ext/zlib/tests/gzputs_basic.phpt (revision 74859783)
1--TEST--
2Test function gzputs() by calling it with its expected arguments
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7
8$filename = __DIR__."/gzputs_basic.txt.gz";
9$h = gzopen($filename, 'w');
10$str = "Here is the string to be written. ";
11$length = 10;
12var_dump(gzputs( $h, $str ) );
13var_dump(gzputs( $h, $str, $length ) );
14gzclose($h);
15
16$h = gzopen($filename, 'r');
17gzpassthru($h);
18gzclose($h);
19echo "\n";
20unlink($filename);
21?>
22--EXPECT--
23int(34)
24int(10)
25Here is the string to be written. Here is th
26