summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gzread_error.phpt
blob: 13129c2c5659190321c7050f574c7ee8d0a20ceb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test function gzread() by calling it more than or less than its expected arguments
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php

$f = dirname(__FILE__)."/004.txt.gz";
$h = gzopen($f, 'r');
$length = 10;
$extra_arg = 'nothing';

var_dump(gzread( $h, $length, $extra_arg ) );

var_dump(gzread());

gzclose($h);

?>
===DONE===
--EXPECTF--
Warning: gzread() expects exactly 2 parameters, 3 given in %s on line %d
bool(false)

Warning: gzread() expects exactly 2 parameters, 0 given in %s on line %d
bool(false)
===DONE===