1--TEST--
2Test gzencode() function : variation
3--SKIPIF--
4<?php
5
6if( substr(PHP_OS, 0, 3) != "WIN" ) {
7  die("skip only for Windows");
8}
9
10if (!extension_loaded("zlib")) {
11    print "skip - ZLIB extension not loaded";
12}
13?>
14--FILE--
15<?php
16if(!function_exists("gzdecode")) {
17    function gzdecode($data)
18    {
19       return gzinflate(substr($data,10,-8));
20    }
21}
22
23
24include(__DIR__ . '/data.inc');
25
26echo "*** Testing gzencode() : variation ***\n";
27
28echo "\n-- Testing multiple compression --\n";
29$output = gzencode(gzencode($data));
30
31$back = gzdecode(gzdecode($output));
32var_dump($data === $back);
33?>
34--EXPECT--
35*** Testing gzencode() : variation ***
36
37-- Testing multiple compression --
38bool(true)
39