1--TEST--
2Test gzinflate() function : error conditions
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) {
6    print "skip - ZLIB extension not loaded";
7}
8?>
9--FILE--
10<?php
11include(__DIR__ . '/data.inc');
12
13echo "*** Testing gzinflate() : error conditions ***\n";
14
15echo "\n-- Testing with a buffer that is too small --\n";
16$data = 'string_val';
17$short_len = strlen($data) - 1;
18$compressed = gzcompress($data);
19
20var_dump(gzinflate($compressed, $short_len));
21
22?>
23--EXPECTF--
24*** Testing gzinflate() : error conditions ***
25
26-- Testing with a buffer that is too small --
27
28Warning: gzinflate(): data error in %s on line %d
29bool(false)
30