Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

gzinflate

Description

The gzinflate of zlib for PHP inflates a deflated string.

Syntax

gzinflate(
    string $data,
    int $max_length = 0
): string|false

Parameters

data

The data compressed by gzdeflate().

max_length

The maximum length of decoded data.

Return

Returns the original uncompressed data or false on error.

Returns an error if the uncompressed data is more than 32768 times the length of the compressed input data or, unless max_length is 0, more than max_length.

Examples

1 · data

<?

$gzdeflatedata = "data";

$data = gzdeflate($gzdeflatedata);

echo $data . PHP_EOL;

$return = gzinflate($data);

echo $return;

?>
KI,I
data

2 · max_length

<?

$gzdeflatedata = "data";

$data = gzdeflate($gzdeflatedata);

echo $data . PHP_EOL;

$max_length = 2;

$return = gzinflate($data, $max_length);

var_export($return);

?>
KI,I
false
HomeMenu