mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
(gzencode(string data [, int level [, int encoding_mode]])),
should fix #15930.
@- The second parameter of gzencode() now is the compression level like
@ in the documentation. The encoding mode is a third (optional) parameter.
# Rework of gzencode(), output should be closer to real gzip output.
# I think in the old version there could be some problems with
# this function and output compression, should be fixed, too.
17 lines
523 B
PHP
17 lines
523 B
PHP
--TEST--
|
|
gzencode()/base64_encode()
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("zlib")) print "skip"; ?>
|
|
--POST--
|
|
--GET--
|
|
--FILE--
|
|
<?php
|
|
$original = 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
|