After a little testing/scripting/playing with PHP 5.3 PHAR archives, I discovered some problems.
glob
PHAR doesn't work with glob. Neither as wrapper (http://www.php.net/manual/en/phar.using.stream.php#104320) nor as a function call.
In my test project I had to iterate over the files in the PHAR and filter the result by a glob-equivalent regular expression.
imagettfbbox
I have no idea why, but imagettfbbox also doesn't understand the PHAR stream wrapper.
The easiest solution here, was to extract the file via copy(). (PHAR::extractTo return with an exception without a stacktrace nor a line number.)
Are there other surprises, which I should expect? Are there other known issues? And are they documented anywhere?
The silex microframework is distributed as a phar file. We have documented most of the issues we ran into in the pitfalls section of the documentation (archived copy).
Note: This is mostly from a user perspective.
glob: I don't think that glob supports streams, so this won't be specific to phar://
but any stream wrapper.
imagettfbbox: I think this is the same, no support for stream wrappers, but only bare files.
There are other functions, you encounter the same, too. For example the ZIP class can't handle streams as well.
And not all stream wrapper support stream wrapper stacking, e.g. one wrapper operating on another.
Feel free to open feature requests in the php bugtracker and/or support the PHP development to introduce better stream support for the components you need it for.
Loosely related: In memory download and extract zip archive
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With