Run Any Script In A Phar

<?php


include 'phar://exakat.phar/script/load.php';

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.

See Also

PHP Features

Last updated: 14 July 2026