Re: execute compressed PHP command-line application

From: Date: Thu, 18 Jul 2013 10:20:19 +0000
Subject: Re: execute compressed PHP command-line application
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

On 18.07.2013, at 12:38, crankypuss <[email protected]> wrote:

> I've been using PHP for linux command-line applications.  Some are quite large.  I've
> built the code to combine the mainline plus everything it calls into a single file to avoid
> portability issues with include libraries.  I've built the code to compress the resulting file
> using gzdeflate after optionally stripping comments and excess whitespace.

didn't you just reinvent the PHAR?

http://docs.php.net/manual/en/intro.phar.php

    Phar archives are best characterized as a convenient way to group several files into a single
file.
    As such, a phar archive provides a way to distribute a complete PHP application in a single file
    and run it from that file without the need to extract it to disk. Additionally, phar archives
can
    be executed by PHP as easily as any other file, both on the commandline and from a web server.

The Phar extension is built into PHP as of PHP version 5.3.0 so you don't need to explicitly
install it.
It's already present in PHP


-- 
Alexey Zakhlestin
CTO at Grids.by/you
https://github.com/indeyets
PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc





Attachment: [application/pgp-signature] Message signed with OpenPGP using GPGMail signature.asc

Thread (11 messages)

« previous php.internals (#68155) next »