php-src/ext/zlib/tests/002.phpt
Thies C. Arntzen d30590369a make sure all string from zlib are \0 terminated.
change one realloc to erealloc (though this code is never reached IMHO)
add regression tests
2001-07-13 15:48:37 +00:00

18 lines
393 B
PHP

--TEST--
gzcompress()/gzuncompress()
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
--POST--
--GET--
--FILE--
<?php
$original = str_repeat("hallo php",4096);
$packed=gzcompress($original);
echo strlen($packed)." ".strlen($original)."\n";
$unpacked=gzuncompress($packed);
if (strcmp($original,$unpacked)==0) echo "Strings are equal";
?>
--EXPECT--
106 36864
Strings are equal