How to extract and "compress" .phar-files using Windows

1.3k Views Asked by At

Basically i need to extract, edit and re-pack a .phar language file using windows. I have downloaded php and trying to run .phar files with php.exe but the php program-window disappears.

Is there any easy way for doing this or a step-by-step guide?

1

There are 1 best solutions below

0
On

The PHP releases contain a phar executable that you can run on windows, too.

You can use it to extract files and add files to the archive.

$ phar help-list
add compress delete extract help help-list info list
meta-del meta-get meta-set pack sign stub-get stub-set tree version

$ phar help
add        Add entries to a PHAR package.

       Required arguments:

       -f  <file>   Specifies the phar file to work on.
       ...          Any number of input files and directories. If -i is in
                    use then ONLY files and matching the given regular
                    expression are being packed. If -x is given then files
...