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