In regards to Mike's comments around passphrases not working correctly in v2, that's not entirely correct. If you want a PHP file to run without having to manually enter in your PGP passphrase you have to follow the steps outlined @ https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase
Hope it helps.