1--TEST--
2gzinflate() and $length argument
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7$original = 'aaaaaaaaaaaaaaa';
8$packed=gzdeflate($original);
9echo strlen($packed)." ".strlen($original)."\n";
10$unpacked=gzinflate($packed, strlen($original));
11if (strcmp($original,$unpacked)==0) echo "Strings are equal\n";
12
13$unpacked=gzinflate($packed, strlen($original)*10);
14if (strcmp($original,$unpacked)==0) echo "Strings are equal\n";
15
16$unpacked=gzinflate($packed, 1);
17if ($unpacked === false) echo "Failed (as expected)\n";
18?>
19--EXPECTF--
205 15
21Strings are equal
22Strings are equal
23
24Warning: gzinflate(): insufficient memory in %s on line %d
25Failed (as expected)
26