<s>
In	O
software	O
,	O
a	O
PHAR	B-General_Concept
(	O
PHP	B-Application
Archive	B-Application
)	O
file	O
is	O
a	O
package	B-Application
format	I-Application
to	O
enable	O
distribution	O
of	O
applications	O
and	O
libraries	O
by	O
bundling	O
many	O
PHP	B-Application
code	O
files	O
and	O
other	O
resources	O
(	O
e.g.	O
</s>
<s>
into	O
a	O
single	O
archive	B-Application
file	I-Application
.	O
</s>
<s>
PHAR	B-General_Concept
files	O
may	O
be	O
in	O
one	O
of	O
three	O
formats	O
:	O
tar	B-Application
,	O
and	O
ZIP	B-General_Concept
,	O
which	O
are	O
compatible	O
with	O
their	O
respective	O
tooling	O
,	O
and	O
a	O
custom	O
PHAR	B-General_Concept
format	O
.	O
</s>
<s>
Regardless	O
of	O
the	O
format	O
used	O
,	O
all	O
PHAR	B-General_Concept
files	O
use	O
the	O
.phar	O
file	O
extension	O
.	O
</s>
<s>
Tar	B-Application
and	O
Zip	B-General_Concept
format	O
archives	O
may	O
be	O
created	O
and	O
unpacked	O
using	O
standard	O
tar	B-Application
and	O
zip	B-General_Concept
utilities	O
,	O
while	O
the	O
PHAR	B-General_Concept
format	O
requires	O
custom	O
PHP	B-Application
code	O
using	O
the	O
,	O
or	O
the	O
PEAR	B-Application
.	O
</s>
<s>
Created	O
in	O
2004	O
,	O
PHAR	B-General_Concept
files	O
were	O
influenced	O
by	O
Java	O
's	O
JAR	B-Language
file	I-Language
format	I-Language
with	O
the	O
aim	O
of	O
speeding	O
up	O
deployment	O
of	O
applications	O
via	O
FTP	O
.	O
</s>
<s>
Rather	O
than	O
using	O
the	O
ZIP	B-General_Concept
file	I-General_Concept
format	I-General_Concept
the	O
simpler	O
tar	B-Application
format	O
was	O
used	O
,	O
and	O
the	O
first	O
PHAR	B-General_Concept
was	O
created	O
using	O
the	O
tar	B-Application
command	I-Application
line	O
utility	O
as	O
a	O
proof	O
of	O
concept	O
.	O
</s>
<s>
On	O
June	O
14	O
,	O
2004	O
the	O
initial	O
PHP_Archive	O
package	O
was	O
proposed	O
to	O
PEAR	B-Application
and	O
on	O
December	O
13	O
,	O
2004	O
it	O
was	O
accepted	O
unanimously	O
.	O
</s>
<s>
In	O
2007	O
,	O
PHP_Archive	O
was	O
ported	O
to	O
C	B-Language
and	O
released	O
as	O
a	O
PECL	O
extension	O
.	O
</s>
<s>
The	O
extension	O
was	O
included	O
and	O
enabled	O
by	O
default	O
in	O
PHP	B-Application
5.3.0	O
.	O
</s>
<s>
A	O
PHAR	B-General_Concept
file	O
allows	O
for	O
a	O
Tar	B-Application
,	O
Zip	B-General_Concept
or	O
PHAR	B-General_Concept
formatted	O
archive	B-Application
.	O
</s>
<s>
Regardless	O
of	O
format	O
,	O
each	O
archive	B-Application
contains	O
three	O
sections	O
:	O
</s>
<s>
Stub	O
—	O
A	O
PHP	B-Application
file	O
that	O
will	O
bootstrap	O
the	O
archive	B-Application
.	O
</s>
<s>
Additionally	O
,	O
the	O
PHAR	B-General_Concept
format	O
may	O
also	O
include	O
a	O
signature	O
for	O
verifying	O
PHAR	B-General_Concept
integrity	O
.	O
</s>
<s>
The	O
manifest	O
contains	O
meta-data	O
information	O
about	O
the	O
archive	B-Application
,	O
and	O
its	O
contents	O
.	O
</s>
<s>
The	O
binary	O
format	O
is	O
intended	O
to	O
be	O
efficient	O
to	O
parse	O
in	O
both	O
PHP	B-Application
and	O
C	B-Language
.	O
It	O
consists	O
of	O
fixed	O
length	O
segments	O
,	O
in	O
addition	O
to	O
pairs	O
of	O
length	O
specifications	O
followed	O
by	O
variable	O
length	O
segments	O
.	O
</s>
<s>
All	O
three	O
formats	O
have	O
support	O
for	O
compression	O
,	O
however	O
only	O
the	O
PHAR	B-General_Concept
format	O
supports	O
both	O
per-file	O
and	O
whole	O
archive	B-Application
compression	O
.	O
</s>
<s>
Zip	B-General_Concept
and	O
Tar	B-Application
formats	O
only	O
support	O
per-file	O
and	O
whole	O
file	B-General_Concept
compression	I-General_Concept
respectively	O
.	O
</s>
<s>
Assuming	O
the	O
PHAR	B-General_Concept
extension	O
is	O
enabled	O
,	O
all	O
PHAR	B-General_Concept
files	O
may	O
be	O
executed	O
simply	O
by	O
executing	O
them	O
with	O
the	O
PHP	B-Application
interpreter	I-Application
(	O
"	O
php	B-Application
file.phar	O
"	O
)	O
.	O
</s>
<s>
If	O
the	O
PHAR	B-General_Concept
extension	O
is	O
not	O
enabled	O
,	O
only	O
PHAR	B-General_Concept
format	O
can	O
be	O
executed	O
.	O
</s>
<s>
Additionally	O
,	O
it	O
is	O
possible	O
to	O
mark	O
a	O
PHAR	B-General_Concept
file	O
as	O
executable	O
,	O
and	O
to	O
add	O
an	O
appropriate	O
shebang	B-Operating_System
to	O
make	O
the	O
PHAR	B-General_Concept
executable	O
directly	O
.	O
</s>
<s>
While	O
PHAR	B-General_Concept
was	O
originally	O
intended	O
for	O
web	O
usage	O
,	O
it	O
is	O
often	O
used	O
by	O
command	O
line	O
utilities	O
.	O
</s>
<s>
Popular	O
applications	O
distributed	O
in	O
PHAR	B-General_Concept
format	O
,	O
include	O
Composer	B-Application
and	O
PHPUnit	B-Language
.	O
</s>
