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