Run Any Script In A Phar

no-email (Damien Seguy), Damien Seguy
Thu, 09 Nov 2023 00:00:00 +0000

It is not possible to call directly a PHP script stored in a Phar archive: the only way to reach it, is using ``include 'phar://$path'``, where PHP understands the ``phar://`` protocol.
And that makes it possible to call directly a PHP script from the shell: include it directly.
In terms of security, it is important to remember that a PHAR is an archive, and anything may be accessed or extracted.