Example code for my "Phar, the PHP exe format" talk
PHP JavaScript Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
autoload
cli
combo
example2
example3
phpmyadmin
web
README.md
awesome.php
example_1.php First version Jan 27, 2012
example_2.php
example_3.php
stub
stubs_1.php
stubs_2.php
stubs_3.php
stubs_4.php

README.md

Examples from "Phar, the PHP .exe format" talk I (Helgi) wrote.

To run any of the create scripts you will have to pass in -d phar.readonly=0 or change it in php.ini (not recommended) as Phar disables write access by default.

php -d phar.readonly=0 example2/create.php

phpMyAdmin

Due to Phar not liking relative paths so the phpmyadmin example isn't working right now

Apache

Example of how you can run Phar in apache

AddType application/x-httpd-php .php .phar

<VirtualHost *:80>
    ServerName   phar.dev
    DocumentRoot /path/to/phar-talk-examples/web/
    DirectoryIndex project.phar
</VirtualHost>