Christian Weiske has a quick tip posted to his site for those using phar archives in PHP and how to remove the .phar
extension and still have them execute correctly.
I'm shipping a new side project as .phar file, php-sqllint.phar. The phar stub has a shebang line so that I can call it without explicitly running PHP. [...] When making the file executable with chmod +x, you can simply execute it.
He wanted to remove the extension but was greeted with an error message when he tried to execute the result. He stumbled on the solution in this PHPUnit bug and corrected the problem with a call to the Phar::mapPhar method inside the phar archive file.