Phar::canCompress

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns whether phar extension supports compression using either zlib or bzip2 final public static bool Phar::canCompress ([ int $type = 0 ] ) This should be used to test whether compression is possible prior to loading a phar archive containing compressed files. Parameters: type Either Phar::GZ or Phar::BZ2 can be used to test wh

Phar::compress

(PHP >= 5.3.0, PECL phar >= 2.0.0) Compresses the entire Phar archive using Gzip or Bzip2 compression public object Phar::compress ( int $compression [, string $extension ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. For tar-based and phar-based phar archives, this method compresses the entire archive usin

Phar::apiVersion

(PHP >= 5.3.0, PECL phar >= 1.0.0) Returns the api version final public static string Phar::apiVersion ( void ) Return the API version of the phar file format that will be used when creating phars. The Phar extension supports reading API version 1.0.0 or newer. API version 1.1.0 is required for SHA-256 and SHA-512 hash, and API version 1.1.1 is required to store empty directories. Returns: T

Phar::addEmptyDir

(Unknown) Add an empty directory to the phar archive public void Phar::addEmptyDir ( string $dirname ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. With this method, an empty directory is created with path dirname. This method is similar to ZipArchive::addEmptyDir(). Parameters:

Phar::buildFromIterator

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a phar archive from an iterator. public array Phar::buildFromIterator ( Iterator $iter [, string $base_directory ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Populate a phar archive from an iterator. Two styles of iterators are supported, iterators that map the

Phar::buildFromDirectory

(PHP >= 5.3.0, PECL phar >= 2.0.0) Construct a phar archive from the files within a directory. public array Phar::buildFromDirectory ( string $base_dir [, string $regex ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. Populate a phar archive from directory contents. The optional second parameter is a regular

Phar::addFile

(Unknown) Add a file from the filesystem to the phar archive public void Phar::addFile ( string $file [, string $localname ] ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. With this method, any file or URL can be added to the phar archive. If the optional second parameter localname is specified, the file will be s

Phar::addFromString

(Unknown) Add a file from a string to the phar archive public void Phar::addFromString ( string $localname, string $contents ) Note: This method requires the php.ini setting phar.readonly to be set to 0 in order to work for Phar objects. Otherwise, a PharException will be thrown. With this method, any string can be added to the phar archive. The file will be stored in the archive with localname as its path. This method i

lzf_compress

(PECL lzf >= 0.1.0) LZF compression string lzf_compress ( string $data ) lzf_compress() compresses the given data string using LZF encoding. Parameters: data The string to compress. Returns: Returns the compressed data or FALSE if an error occurred. See also:

lzf_optimized_for

(PECL lzf >= 1.0.0) Determines what LZF extension was optimized for int lzf_optimized_for ( void ) Determines what was LZF extension optimized for during compilation. Returns: Returns 1 if LZF was optimized for speed, 0 for compression.