• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • Phar::getSupportedCompression()

    (PHP 5 >= 5.3.0, PHP 7, PECL phar >= 1.2.0)

    Return array of supported compression algorithms

    说明

    finalpublicstaticPhar::getSupportedCompression(void): array

    参数

    No parameters.

    返回值

    Returns an array containing any ofPhar::GZorPhar::BZ2, depending on the availability of the zlib extension or the bz2 extension.

    参见

    • PharFileInfo::getCompressedSize() Returns the actual size of the file(with compression)inside the Phar archive
    • PharFileInfo::isCompressed() Returns whether the entry is compressed
    • PharFileInfo::compress() Compresses the current Phar entry with either zlib or bzip2 compression
    • PharFileInfo::decompress() Decompresses the current Phar entry within the phar
    • Phar::compress() Compresses the entire Phar archive using Gzip or Bzip2 compression
    • Phar::decompress() Decompresses the entire Phar archive
    • Phar::canCompress() Returns whether phar extension supports compression using either zlib or bzip2
    • Phar::isCompressed() Returns Phar::GZ or PHAR::BZ2 if the entire phar archive is compressed(.tar.gz/tar.bz and so on)
    • Phar::compressFiles() Compresses all files in the current Phar archive
    • Phar::decompressFiles() Decompresses all files in the current Phar archive