php-src/ext/zlib/tests/003.phpt
Nuno Lopes 0e29c9a870 upgrade the rest of the functions to Unicode (except ob_gzhandler, that I leave for Mike).
also update tests to force binary data to be passed
2006-07-27 16:31:07 +00:00

15 lines
514 B
PHP

--TEST--
gzencode()/base64_encode()
--SKIPIF--
<?php if (!extension_loaded("zlib")) print "skip"; ?>
--FILE--
<?php
$original = (binary)str_repeat("hallo php",4096);
$packed=gzencode($original);
echo strlen($packed)." ".strlen($original)."\n";
if (strcmp(base64_encode($packed),"H4sIAAAAAAAAA+3GoQ0AQAgEsFV+NdwJEthf/R6kVU11z9tsRERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERETu5gPlQAe9AJAAAA==")==0) echo "Strings are equal";
?>
--EXPECT--
118 36864
Strings are equal