预定义常量

下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。

ConstantValueDescription
Phar::NONE (integer)0x00000000no compression
Phar::COMPRESSED (integer)0x0000F000bitmask that can be used with file flags to determine if any compression is present
Phar::GZ (integer)0x00001000zlib (gzip) compression
Phar::BZ2 (integer)0x00002000bzip2 compression
ConstantValueDescription
Phar::PHAR (integer)1phar file format
Phar::TAR (integer)2tar file format
Phar::ZIP (integer)3zip file format
ConstantValueDescription
Phar::MD5 (integer)0x0001signature with md5 hash algorithm
Phar::SHA1 (integer)0x0002signature with sha1 hash algorithm
Phar::SHA256 (integer)0x0003signature with sha256 hash algorithm (requires hash extension)
Phar::SHA512 (integer)0x0004signature with sha512 hash algorithm (requires hash extension)
Phar::OPENSSL (integer)0x0010signature with OpenSSL public/private key pair. This is a true, asymmetric key signature.
ConstantValueDescription
Phar::PHP (integer)0used to instruct the mimeoverrides parameter of Phar::webPhar that the extension should be parsed as a PHP file
Phar::PHPS (integer)1used to instruct the mimeoverrides parameter of Phar::webPhar that the extension should be parsed as a PHP source file through highlight_file