php-src/ext/zlib/tests/gzcompress_variation1.phpt
Michael Wallner 11d24c1593 * implement new output API, fixing some bugs and implementing some feature
requests--let's see what I can dig out of the bugtracker for NEWS--
  and while crossing the road:
   * implemented new zlib API
   * fixed up ext/tidy (what was "s&" in zend_parse_parameters() supposed to do?)

Thanks to Jani and Felipe for pioneering.
2010-05-31 10:29:43 +00:00

35 lines
783 B
PHP

--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(dirname(__FILE__) . '/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===
--EXPECTF--
*** Testing gzcompress() : variation ***
-- Testing multiple compression --
string(32) "764809aef15bb34cb73ad49ecb600d99"
string(32) "eba942bc2061f23ea8688cc5101872a4"
===Done===