<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.compression.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'book.phar.php',
    1 => 'Phar',
    2 => 'Phar',
  ),
  'up' => 
  array (
    0 => 'refs.compression.php',
    1 => 'Розширення для архівації та стиснення',
  ),
  'prev' => 
  array (
    0 => 'function.lzf-optimized-for.php',
    1 => 'lzf_optimized_for',
  ),
  'next' => 
  array (
    0 => 'intro.phar.php',
    1 => 'Вступ',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.phar.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.phar" class="book">
 
 <h1 class="title">Phar</h1>
 
 
 
 
 
 







 




 





 





 





 




 




 




 





<ul class="chunklist chunklist_book"><li><a href="intro.phar.php">Вступ</a></li><li><a href="phar.setup.php">Встановлення/налаштування</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="phar.requirements.php">Вимоги</a></li><li><a href="phar.installation.php">Встановлення</a></li><li><a href="phar.configuration.php">Налаштування під час виконання</a></li><li><a href="phar.resources.php">Типи ресурсів</a></li></ul></li><li><a href="phar.constants.php">Попередньо визначені константи</a></li><li><a href="phar.using.php">Using Phar Archives</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="phar.using.intro.php">Using Phar Archives: Introduction</a></li><li><a href="phar.using.stream.php">Using Phar Archives: the phar stream wrapper</a></li><li><a href="phar.using.object.php">Using Phar Archives: the Phar and PharData class</a></li></ul></li><li><a href="phar.creating.php">Creating Phar Archives</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="phar.creating.intro.php">Creating Phar Archives: Introduction</a></li></ul></li><li><a href="phar.fileformat.php">What makes a phar a phar and not a tar or a zip?</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="phar.fileformat.ingredients.php">Ingredients of all Phar archives, independent of file format</a></li><li><a href="phar.fileformat.stub.php">Phar file stub</a></li><li><a href="phar.fileformat.comparison.php">Head-to-head comparison of Phar, Tar and Zip</a></li><li><a href="phar.fileformat.tar.php">Tar-based phars</a></li><li><a href="phar.fileformat.zip.php">Zip-based phars</a></li><li><a href="phar.fileformat.phar.php">Phar File Format</a></li><li><a href="phar.fileformat.flags.php">Global Phar bitmapped flags</a></li><li><a href="phar.fileformat.manifestfile.php">Phar manifest file entry definition</a></li><li><a href="phar.fileformat.signature.php">Phar Signature format</a></li></ul></li><li><a href="class.phar.php">Phar</a> — The Phar class<ul class="chunklist chunklist_book chunklist_children"><li><a href="phar.addemptydir.php">Phar::addEmptyDir</a> — Add an empty directory to the phar archive</li><li><a href="phar.addfile.php">Phar::addFile</a> — Add a file from the filesystem to the phar archive</li><li><a href="phar.addfromstring.php">Phar::addFromString</a> — Add a file from a string to the phar archive</li><li><a href="phar.apiversion.php">Phar::apiVersion</a> — Returns the api version</li><li><a href="phar.buildfromdirectory.php">Phar::buildFromDirectory</a> — Construct a phar archive from the files within a directory</li><li><a href="phar.buildfromiterator.php">Phar::buildFromIterator</a> — Construct a phar archive from an iterator</li><li><a href="phar.cancompress.php">Phar::canCompress</a> — Returns whether phar extension supports compression using either zlib or bzip2</li><li><a href="phar.canwrite.php">Phar::canWrite</a> — Returns whether phar extension supports writing and creating phars</li><li><a href="phar.compress.php">Phar::compress</a> — Compresses the entire Phar archive using Gzip or Bzip2 compression</li><li><a href="phar.compressfiles.php">Phar::compressFiles</a> — Compresses all files in the current Phar archive</li><li><a href="phar.construct.php">Phar::__construct</a> — Construct a Phar archive object</li><li><a href="phar.converttodata.php">Phar::convertToData</a> — Convert a phar archive to a non-executable tar or zip file</li><li><a href="phar.converttoexecutable.php">Phar::convertToExecutable</a> — Convert a phar archive to another executable phar archive file format</li><li><a href="phar.copy.php">Phar::copy</a> — Copy a file internal to the phar archive to another new file within the phar</li><li><a href="phar.count.php">Phar::count</a> — Returns the number of entries (files) in the Phar archive</li><li><a href="phar.createdefaultstub.php">Phar::createDefaultStub</a> — Create a phar-file format specific stub</li><li><a href="phar.decompress.php">Phar::decompress</a> — Decompresses the entire Phar archive</li><li><a href="phar.decompressfiles.php">Phar::decompressFiles</a> — Decompresses all files in the current Phar archive</li><li><a href="phar.delmetadata.php">Phar::delMetadata</a> — Deletes the global metadata of the phar</li><li><a href="phar.delete.php">Phar::delete</a> — Delete a file within a phar archive</li><li><a href="phar.destruct.php">Phar::__destruct</a> — Destructs a Phar archive object</li><li><a href="phar.extractto.php">Phar::extractTo</a> — Extract the contents of a phar archive to a directory</li><li><a href="phar.getalias.php">Phar::getAlias</a> — Get the alias for Phar</li><li><a href="phar.getmetadata.php">Phar::getMetadata</a> — Returns phar archive meta-data</li><li><a href="phar.getmodified.php">Phar::getModified</a> — Return whether phar was modified</li><li><a href="phar.getpath.php">Phar::getPath</a> — Get the real path to the Phar archive on disk</li><li><a href="phar.getsignature.php">Phar::getSignature</a> — Return MD5/SHA1/SHA256/SHA512/OpenSSL signature of a Phar archive</li><li><a href="phar.getstub.php">Phar::getStub</a> — Return the PHP loader or bootstrap stub of a Phar archive</li><li><a href="phar.getsupportedcompression.php">Phar::getSupportedCompression</a> — Return array of supported compression algorithms</li><li><a href="phar.getsupportedsignatures.php">Phar::getSupportedSignatures</a> — Return array of supported signature types</li><li><a href="phar.getversion.php">Phar::getVersion</a> — Return version info of Phar archive</li><li><a href="phar.hasmetadata.php">Phar::hasMetadata</a> — Returns whether phar has global meta-data</li><li><a href="phar.interceptfilefuncs.php">Phar::interceptFileFuncs</a> — Instructs phar to intercept fopen, file_get_contents, opendir, and all of the stat-related functions</li><li><a href="phar.isbuffering.php">Phar::isBuffering</a> — Used to determine whether Phar write operations are being buffered, or are flushing directly to disk</li><li><a href="phar.iscompressed.php">Phar::isCompressed</a> — Returns Phar::GZ or PHAR::BZ2 if the entire phar archive is compressed (.tar.gz/tar.bz and so on)</li><li><a href="phar.isfileformat.php">Phar::isFileFormat</a> — Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter</li><li><a href="phar.isvalidpharfilename.php">Phar::isValidPharFilename</a> — Returns whether the given filename is a valid phar filename</li><li><a href="phar.iswritable.php">Phar::isWritable</a> — Returns true if the phar archive can be modified</li><li><a href="phar.loadphar.php">Phar::loadPhar</a> — Loads any phar archive with an alias</li><li><a href="phar.mapphar.php">Phar::mapPhar</a> — Reads the currently executed file (a phar) and registers its manifest</li><li><a href="phar.mount.php">Phar::mount</a> — Mount an external path or file to a virtual location within the phar archive</li><li><a href="phar.mungserver.php">Phar::mungServer</a> — Defines a list of up to 4 $_SERVER variables that should be modified for execution</li><li><a href="phar.offsetexists.php">Phar::offsetExists</a> — Determines whether a file exists in the phar</li><li><a href="phar.offsetget.php">Phar::offsetGet</a> — Gets a PharFileInfo object for a specific file</li><li><a href="phar.offsetset.php">Phar::offsetSet</a> — Set the contents of an internal file to those of an external file</li><li><a href="phar.offsetunset.php">Phar::offsetUnset</a> — Remove a file from a phar</li><li><a href="phar.running.php">Phar::running</a> — Returns the full path on disk or full phar URL to the currently executing Phar archive</li><li><a href="phar.setalias.php">Phar::setAlias</a> — Set the alias for the Phar archive</li><li><a href="phar.setdefaultstub.php">Phar::setDefaultStub</a> — Used to set the PHP loader or bootstrap stub of a Phar archive to the default loader</li><li><a href="phar.setmetadata.php">Phar::setMetadata</a> — Sets phar archive meta-data</li><li><a href="phar.setsignaturealgorithm.php">Phar::setSignatureAlgorithm</a> — Set the signature algorithm for a phar and apply it</li><li><a href="phar.setstub.php">Phar::setStub</a> — Used to set the PHP loader or bootstrap stub of a Phar archive</li><li><a href="phar.startbuffering.php">Phar::startBuffering</a> — Start buffering Phar write operations, do not modify the Phar object on disk</li><li><a href="phar.stopbuffering.php">Phar::stopBuffering</a> — Stop buffering write requests to the Phar archive, and save changes to disk</li><li><a href="phar.unlinkarchive.php">Phar::unlinkArchive</a> — Completely remove a phar archive from disk and from memory</li><li><a href="phar.webphar.php">Phar::webPhar</a> — Routes a request from a web browser to an internal file within the phar archive</li></ul></li><li><a href="class.phardata.php">PharData</a> — The PharData class<ul class="chunklist chunklist_book chunklist_children"><li><a href="phardata.addemptydir.php">PharData::addEmptyDir</a> — Add an empty directory to the tar/zip archive</li><li><a href="phardata.addfile.php">PharData::addFile</a> — Add a file from the filesystem to the tar/zip archive</li><li><a href="phardata.addfromstring.php">PharData::addFromString</a> — Add a file from a string to the tar/zip archive</li><li><a href="phardata.buildfromdirectory.php">PharData::buildFromDirectory</a> — Construct a tar/zip archive from the files within a directory</li><li><a href="phardata.buildfromiterator.php">PharData::buildFromIterator</a> — Construct a tar or zip archive from an iterator</li><li><a href="phardata.compress.php">PharData::compress</a> — Compresses the entire tar/zip archive using Gzip or Bzip2 compression</li><li><a href="phardata.compressfiles.php">PharData::compressFiles</a> — Compresses all files in the current tar/zip archive</li><li><a href="phardata.construct.php">PharData::__construct</a> — Construct a non-executable tar or zip archive object</li><li><a href="phardata.converttodata.php">PharData::convertToData</a> — Convert a phar archive to a non-executable tar or zip file</li><li><a href="phardata.converttoexecutable.php">PharData::convertToExecutable</a> — Convert a non-executable tar/zip archive to an executable phar archive</li><li><a href="phardata.copy.php">PharData::copy</a> — Copy a file internal to the tar/zip archive to another new file within the same archive</li><li><a href="phardata.decompress.php">PharData::decompress</a> — Decompresses the entire Phar archive</li><li><a href="phardata.decompressfiles.php">PharData::decompressFiles</a> — Decompresses all files in the current zip archive</li><li><a href="phardata.delmetadata.php">PharData::delMetadata</a> — Deletes the global metadata of a zip archive</li><li><a href="phardata.delete.php">PharData::delete</a> — Delete a file within a tar/zip archive</li><li><a href="phardata.destruct.php">PharData::__destruct</a> — Destructs a non-executable tar or zip archive object</li><li><a href="phardata.extractto.php">PharData::extractTo</a> — Extract the contents of a tar/zip archive to a directory</li><li><a href="phardata.iswritable.php">PharData::isWritable</a> — Returns true if the tar/zip archive can be modified</li><li><a href="phardata.offsetset.php">PharData::offsetSet</a> — Set the contents of a file within the tar/zip to those of an external file or string</li><li><a href="phardata.offsetunset.php">PharData::offsetUnset</a> — Remove a file from a tar/zip archive</li><li><a href="phardata.setalias.php">PharData::setAlias</a> — Dummy function (Phar::setAlias is not valid for PharData)</li><li><a href="phardata.setdefaultstub.php">PharData::setDefaultStub</a> — Dummy function (Phar::setDefaultStub is not valid for PharData)</li><li><a href="phardata.setmetadata.php">PharData::setMetadata</a> — Sets phar archive meta-data</li><li><a href="phardata.setsignaturealgorithm.php">PharData::setSignatureAlgorithm</a> — Set the signature algorithm for a phar and apply it</li><li><a href="phardata.setstub.php">PharData::setStub</a> — Dummy function (Phar::setStub is not valid for PharData)</li></ul></li><li><a href="class.pharfileinfo.php">PharFileInfo</a> — The PharFileInfo class<ul class="chunklist chunklist_book chunklist_children"><li><a href="pharfileinfo.chmod.php">PharFileInfo::chmod</a> — Sets file-specific permission bits</li><li><a href="pharfileinfo.compress.php">PharFileInfo::compress</a> — Compresses the current Phar entry with either zlib or bzip2 compression</li><li><a href="pharfileinfo.construct.php">PharFileInfo::__construct</a> — Construct a Phar entry object</li><li><a href="pharfileinfo.decompress.php">PharFileInfo::decompress</a> — Decompresses the current Phar entry within the phar</li><li><a href="pharfileinfo.delmetadata.php">PharFileInfo::delMetadata</a> — Deletes the metadata of the entry</li><li><a href="pharfileinfo.destruct.php">PharFileInfo::__destruct</a> — Destructs a Phar entry object</li><li><a href="pharfileinfo.getcrc32.php">PharFileInfo::getCRC32</a> — Returns CRC32 code or throws an exception if CRC has not been verified</li><li><a href="pharfileinfo.getcompressedsize.php">PharFileInfo::getCompressedSize</a> — Returns the actual size of the file (with compression) inside the Phar archive</li><li><a href="pharfileinfo.getcontent.php">PharFileInfo::getContent</a> — Get the complete file contents of the entry</li><li><a href="pharfileinfo.getmetadata.php">PharFileInfo::getMetadata</a> — Returns file-specific meta-data saved with a file</li><li><a href="pharfileinfo.getpharflags.php">PharFileInfo::getPharFlags</a> — Returns the Phar file entry flags</li><li><a href="pharfileinfo.hasmetadata.php">PharFileInfo::hasMetadata</a> — Returns the metadata of the entry</li><li><a href="pharfileinfo.iscrcchecked.php">PharFileInfo::isCRCChecked</a> — Returns whether file entry has had its CRC verified</li><li><a href="pharfileinfo.iscompressed.php">PharFileInfo::isCompressed</a> — Returns whether the entry is compressed</li><li><a href="pharfileinfo.setmetadata.php">PharFileInfo::setMetadata</a> — Sets file-specific meta-data saved with a file</li></ul></li><li><a href="class.pharexception.php">PharException</a> — The PharException class</li></ul></div><?php manual_footer($setup); ?>