Unexpected problems with PHP PHAR

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

Tags:

Php

Glob

Phar