xref: /PHP-7.3/ext/zlib/tests/gzread_error.phpt (revision b746e698)
1--TEST--
2Test function gzread() 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$length = 10;
15$extra_arg = 'nothing';
16
17var_dump(gzread( $h, $length, $extra_arg ) );
18
19var_dump(gzread());
20
21gzclose($h);
22
23?>
24===DONE===
25--EXPECTF--
26Warning: gzread() expects exactly 2 parameters, 3 given in %s on line %d
27bool(false)
28
29Warning: gzread() expects exactly 2 parameters, 0 given in %s on line %d
30bool(false)
31===DONE===
32