Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68155 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18706 invoked from network); 18 Jul 2013 10:20:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2013 10:20:26 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.45 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.215.45 mail-la0-f45.google.com Received: from [209.85.215.45] ([209.85.215.45:55312] helo=mail-la0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/43-20914-861C7E15 for ; Thu, 18 Jul 2013 06:20:25 -0400 Received: by mail-la0-f45.google.com with SMTP id ev20so618434lab.4 for ; Thu, 18 Jul 2013 03:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=QeCuTsdC70sclTFS8Gv1YY4b5iJk8KPc7e8sbHFvIp4=; b=tUGtERjVl3obB9ZslyZ70ZRPlNduLlV+a03Gfs/J1HyAlj8EjqwkicpToJVOBXJHNE wCnJ6C2W+3AIFKgtIXYDeNsWycEeBLMuNshbUZhX7MRtCxFxKzLCA4UhAmmbY9EWxvSu SHvMU3yYR2Sh3Y4FD6wSpZ5wlQ8n/4XjThJZhhEq5gkxEt5qFcvk/NNge3fkxpViTDc1 FVoXiZcvbsdiwhIT+Euqjy4YTy9scA98u+cLYR6dTwRplwhY6kmuEjGRzbxZRx1Srh2K umQZmpLLlS8Q4BKEaVLpdqChU/n2exJ+l8g41n+1eYd8c3QRaeWG4yV/JCKV9Qr+hCU7 NgTA== X-Received: by 10.112.198.10 with SMTP id iy10mr5035229lbc.38.1374142821690; Thu, 18 Jul 2013 03:20:21 -0700 (PDT) Received: from [10.0.1.7] ([46.252.161.106]) by mx.google.com with ESMTPSA id p10sm3890069lap.8.2013.07.18.03.20.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Jul 2013 03:20:20 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_7A5454AC-92A6-4164-AAE6-72620B4CDA1E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) In-Reply-To: Date: Thu, 18 Jul 2013 14:20:19 +0400 Cc: internals@lists.php.net Message-ID: References: To: crankypuss X-Mailer: Apple Mail (2.1508) Subject: Re: [PHP-DEV] execute compressed PHP command-line application From: indeyets@gmail.com (Alexey Zakhlestin) --Apple-Mail=_7A5454AC-92A6-4164-AAE6-72620B4CDA1E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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? 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 --=20 Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc --Apple-Mail=_7A5454AC-92A6-4164-AAE6-72620B4CDA1E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.19 (Darwin) iQEcBAEBCgAGBQJR58FjAAoJEMkJcRxZdR27zAoH/jCylyYYaRZLrphy3Y/vhKFc 7gX3v5gDc9XM1O04DbMxMPoDjc/4HlwgZ4vUdEja9JW0Y4xV/E0A2UOTXUPkfw84 Lu5k8sjqx4j6dHQeiJ5LUdfNqy5BC/6tgyxfCK3sDOPUmlRxDzmEIEEpXOI42YIP C6kEhuJDgeEneJcS55QRtB9Hm2vTqpTMtIiQurADJf9aNCOCZXDjUUn3axQvI3Pw uKo34/vn85+rL5FOzXLwqWLZ+YU6fmeFriCk1YaNJfNTFwRxmYnxnDZWkpVn8QBz +w8Zy9N1pZoO2dBcMhz3WYS8aypiCez83HQvluFVjhDLVi3GGMclGJ7lMuO3dW8= =Ntf7 -----END PGP SIGNATURE----- --Apple-Mail=_7A5454AC-92A6-4164-AAE6-72620B4CDA1E--