Re: execute compressed PHP command-line application

From: Date: Fri, 26 Jul 2013 10:56:13 +0000
Subject: Re: execute compressed PHP command-line application
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-68318@lists.php.net to get a copy of this message
> check out http://us1.php.net/phar and >>> >> >> http://www.php.net/manual/en/**wrappers.phar.php<http://www.php.net/manual/en/wrappers.phar.php> >> currently this is the preferred method >> > > Preferred by whom, thank you very much? Who is it that has set > himself/itself up as The Authority on this subject? the pear installer is shipped as a phar file, phpunit also provides phar releases, composer also provided as a phar file, phpdocumentor also available as a phar file, etc. I only talking about my personal experience, but it seems to me that currently phar is the preferred method for shipping single file php applications out there. > > > for shipping an application in a >> single file, as it is allows you to work those files and directories in >> the >> phar via most php functions as those would be normal files/directories on >> the disk so stuff like __LINE__ would point a valid path. >> > > The objective is not to perpetuate the idiocy of includes but to obviate > it. I fail to see how includes are an idiocy in general, similarly there is no clear winner in the dynamic linking vs static linking, but depends on your usecase. From your primary comment I missed that your main reason for bundling everything into one file was for portability, depending on your userbase I would say that some dependency management tool (composer comes to mind) would serve that goal better, see: http://www.phptherightway.com/#dependency_management -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#68318) next »