summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/gzcompress_variation1.phpt
blob: c4bc0a1ff5e8e5931910a4c889fb6ae45db1b222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Test gzcompress() function : variation
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
	print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
/* Prototype  : string gzcompress(string data [, int level, [int encoding]])
 * Description: Gzip-compress a string
 * Source code: ext/zlib/zlib.c
 * Alias to functions:
 */

include(__DIR__ . '/data.inc');

echo "*** Testing gzcompress() : variation ***\n";

echo "\n-- Testing multiple compression --\n";
$output = gzcompress($data);
var_dump( md5($output));
var_dump(md5(gzcompress($output)));

?>
===Done===
--EXPECT--
*** Testing gzcompress() : variation ***

-- Testing multiple compression --
string(32) "764809aef15bb34cb73ad49ecb600d99"
string(32) "eba942bc2061f23ea8688cc5101872a4"
===Done===