Logo

Zlib Functions

deflate_add deflate_init gzclose gzcompress gzdecode gzdeflate gzencode gzeof gzfile gzgetc gzgets gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite inflate_add inflate_get_read_len inflate_get_status inflate_init ob_gzhandler readgzfile zlib_decode zlib_encode zlib_get_coding_type

zlib_encode

Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Compress data with the specified encoding
<?php zlib_encode(string $data, int $encoding, int $level = -1): string|false