gzinflate
(PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)
gzinflate — Inflate a deflated string
Description
This function inflates a deflated string.
Return Values
The original uncompressed data or false on error.
Errors/Exceptions
Throws a ValueError if max_length
is negative. If data is not valid compressed data, or the
uncompressed data is too large for max_length when it is not
0, an E_WARNING is raised and false is returned.
Changelog
| Version | Description |
|---|---|
| 8.0.0 |
Now throws a ValueError if max_length
is negative. Previously, an E_WARNING was raised
and false was returned.
|
Examples
Example #1 gzinflate() example
<?php
$compressed = gzdeflate('Compress me', 9);
$uncompressed = gzinflate($compressed);
echo $uncompressed;
?>See Also
- gzdeflate() - Deflate a string
- gzcompress() - Compress a string
- gzuncompress() - Uncompress a compressed string
- gzencode() - Create a gzip compressed string
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
