xref: /PHP-7.1/ext/zlib/tests/gzclose_error.phpt (revision 113213f0)
1--TEST--
2Test function gzclose() by calling it more than or less than its expected arguments
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) {
6	print "skip - ZLIB extension not loaded";
7}
8?>
9--FILE--
10<?php
11
12$f = dirname(__FILE__)."/004.txt.gz";
13$h = gzopen($f, 'r');
14$extra_arg = 'nothing';
15
16
17
18var_dump(gzclose( $h, $extra_arg ) );
19var_dump(gzclose());
20
21gzclose($h);
22
23
24?>
25===DONE===
26--EXPECTF--
27Warning: gzclose() expects exactly 1 parameter, 2 given in %s on line %d
28bool(false)
29
30Warning: gzclose() expects exactly 1 parameter, 0 given in %s on line %d
31bool(false)
32===DONE===
33