PHP Extension and Application Repository archive
File type: Archive and compressed file, Internet related file
A phar file extension identifies a PHP Archive file. A phar file packages PHP application code and related resources in a single archive for distribution or execution.
PHP's Phar extension, included with PHP 5.3 and later, can create, read, and extract Phar archives.
File type category:
Archive and compressed file
Internet related file
Date updated: October 6, 2026
The PHP Archive (PHAR) format belongs to PHP, an open-source server-side scripting language and runtime used to create dynamic web pages and Internet applications. PHP and the Phar extension are available on the platforms supported by PHP.
A Phar archive can contain PHP source files, application resources, and archive metadata. It allows a PHP application to be distributed as one file and, when it includes an executable Phar stub, run through the PHP command-line interpreter. Archive contents can use gzip or bzip2 compression.
Phar archives are similar in purpose to jar, although JAR files are used by Java applications. The format remains supported by current PHP releases. PEAR, or PHP Extension and Application Repository, is a separate PHP package repository and is not the expansion of PHAR. PEAR has also been distributed as a PHAR archive.
Use PHP 5.3 or later with the Phar extension enabled. An executable archive can be run with the PHP command-line interpreter, for example with the command php application.phar. PHP scripts can use the Phar and PharData classes to inspect or extract an archive's contents.
A Phar archive is a software packaging format, so it usually has no meaningful document-style conversion. Extract its contents with PHP and repackage the files in another archive format when necessary.
Repackaging the contents as a ZIP or TAR archive creates a different archive and does not preserve the executable Phar stub or its single-file application behavior.
Software applications that handle other tasks involving phar files:
Multiplatform