There is something I entirely missed as for phar files. I am installing a project that requires phpunit, pdepend and other dependencies. I fetched them as .phar files. But, I am
Extending on @pozs’s answer, you can actually use PharData->extractTo in a simple one-liner:
php -r '$phar = new Phar("phar-file.phar"); $phar->extractTo("./directory");'