xref: /PHP-7.0/ext/zlib/tests/gzgetc_error.phpt (revision 8f9ec423)
1--TEST--
2Test function gzgetc() 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';
15var_dump(gzgetc( $h, $extra_arg ) );
16
17var_dump(gzgetc() );
18
19gzclose($h);
20?>
21===DONE===
22--EXPECTF--
23
24Warning: gzgetc() expects exactly 1 parameter, 2 given in %s on line %d
25bool(false)
26
27Warning: gzgetc() expects exactly 1 parameter, 0 given in %s on line %d
28bool(false)
29===DONE===