<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.iscompressed.html">Phar::isCompressed</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.isvalidpharfilename.html">Phar::isValidPharFilename</a></div> <div class="up"><a href="class.phar.html">Phar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="phar.isfileformat" class="refentry"> <div class="refnamediv"> <h1 class="refname">Phar::isFileFormat</h1> <p class="verinfo">(PHP >= 5.3.0, PECL phar >= 2.0.0)</p><p class="refpurpose"><span class="refname">Phar::isFileFormat</span> — <span class="dc-title">Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter</span></p> </div> <div class="refsect1 description" id="refsect1-phar.isfileformat-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>Phar::isFileFormat</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$format</code></span> )</div> <p class="para rdfs-comment"> </p> </div> <div class="refsect1 parameters" id="refsect1-phar.isfileformat-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">format</code></em></span> <dd> <p class="para"> Either <em>Phar::PHAR</em>, <em>Phar::TAR</em>, or <em>Phar::ZIP</em> to test for the format of the archive. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-phar.isfileformat-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> if the phar archive matches the file format requested by the parameter </p> </div> <div class="refsect1 errors" id="refsect1-phar.isfileformat-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> <a href="class.pharexception.html" class="classname">PharException</a> is thrown if the parameter is an unknown file format specifier. </p> </div> <div class="refsect1 seealso" id="refsect1-phar.isfileformat-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="phar.converttoexecutable.html" class="function" rel="rdfs-seeAlso">Phar::convertToExecutable()</a> - Convert a phar archive to another executable phar archive file format</span></li> <li class="member"> <span class="function"><a href="phar.converttodata.html" class="function" rel="rdfs-seeAlso">Phar::convertToData()</a> - Convert a phar archive to a non-executable tar or zip file</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="phar.iscompressed.html">Phar::isCompressed</a></div> <div class="next" style="text-align: right; float: right;"><a href="phar.isvalidpharfilename.html">Phar::isValidPharFilename</a></div> <div class="up"><a href="class.phar.html">Phar</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>