canCompress
(no version information, might be only in CVS)
canCompress -- Returns whether phar extension supports compression using zlib or bzip2
Description
bool
canCompress ( void )
This should be used to test whether compression is possible prior to
loading a phar archive containing compressed files.
Return Values
TRUE if compression/decompression is available, FALSE if not.
Examples
Example 1. A canCompress() example
<?php if (Phar::canCompress()) { echo file_get_contents('phar://whatever.phar/internal/file.txt'); } else { echo 'no compression available'; } ?>
|
|
See Also
PharFileInfo::isCompressed() |