On his blog today, Greg Beaver has introduced a new pecl extension to add the phar functionality into any PHP installation as easily as adding any other pecl functionality.
After 14 months and nearly 200 commits, Marcus Borger and I have finished the first release of the phar extension in PECL. Phar provides both a stream wrapper (phar://) and a Phar class which can be used to access the contents of a phar archive. What is a phar archive? Think of it as a virtual filesystem that is customized for use with PHP, sort of like a Java .jar archive. Incidentally, the phar extension is a C implementation of the principles behind the PHP_Archive PEAR package.
A beginners guide to installation and usage is included, showing how to configure your installation and create two simple packages - one with a simple "Hello world" PHP script inside and the other grabbing the entire contents of a directory (and subdirectories) and pushing them in.