Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68157 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22044 invoked from network); 18 Jul 2013 10:39:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2013 10:39:51 -0000 Authentication-Results: pb1.pair.com header.from=fullmoon@newsguy.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.3 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.3 plane.gmane.org Received: from [80.91.229.3] ([80.91.229.3:48672] helo=plane.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/F3-20914-6F5C7E15 for ; Thu, 18 Jul 2013 06:39:50 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uzlch-00033b-0x for internals@lists.php.net; Thu, 18 Jul 2013 12:39:47 +0200 Received: from 5.sub-75-196-225.myvzw.com ([75.196.225.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 12:39:47 +0200 Received: from fullmoon by 5.sub-75-196-225.myvzw.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 18 Jul 2013 12:39:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Thu, 18 Jul 2013 04:39:30 -0600 Lines: 21 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 5.sub-75-196-225.myvzw.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: X-Archive: encrypt Subject: Re: [PHP-DEV] execute compressed PHP command-line application From: fullmoon@newsguy.com (crankypuss) On 07/18/2013 04:20 AM, Alexey Zakhlestin wrote: > > On 18.07.2013, at 12:38, crankypuss 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? I think not, though on the surface there are similarities. Rather than conveniently including an entire directory full of code that is mostly unused, I'm including only the code that *is* used, and other functions of the program that does this include getting a call-tree, listing references, and so forth; the function of collecting all the actually-used code into a single file is only a small part of the whole. And strange as it may seem, this whole project is only an interim measure on the way to something that might be quite different. Thanks for mentioning Phar though, as Terry mentioned it might be useful in compressing/executing the single-file application, though I haven't yet figured it out to that extent.