1--TEST--
2Test gzuncompress() function : basic functionality
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 gzuncompress() : basic functionality ***\n";
14
15
16// Initialise all required variables
17$compressed = gzcompress($data);
18
19echo "\n-- Basic decompress --\n";
20var_dump(strcmp($data, gzuncompress($compressed)));
21
22
23$length = 3547;
24echo "\n-- Calling gzuncompress() with max length of $length --\n";
25echo "Result length is ".  strlen(gzuncompress($compressed, $length)) .  "\n";
26
27?>
28--EXPECT--
29*** Testing gzuncompress() : basic functionality ***
30
31-- Basic decompress --
32int(0)
33
34-- Calling gzuncompress() with max length of 3547 --
35Result length is 3547
36