On Debian systems you may generally wish to make php executables run without shebang:

    update-binfmts --install phar --extension phar
    update-binfmts --install php  --extension php