Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Phar::isCompressedPhar::isValidPharFilename>
^PharLast updated: Mon, 26 Oct 2026

Phar::isFileFormat

(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 2.0.0)

Phar::isFileFormat — Returns true if the phar archive is based on the tar/phar/zip file format depending on the parameter

Description

public function Phar::isFileFormat(int $format): bool

Parameters

format

Either Phar::PHAR, Phar::TAR, or Phar::ZIP to test for the format of the archive.

Return Values

Returns true if the phar archive matches the file format requested by the parameter

Errors/Exceptions

PharException is thrown if the parameter is an unknown file format specifier.

See Also


<Phar::isCompressedPhar::isValidPharFilename>
^PharLast updated: Mon, 26 Oct 2026