I'd like to protect the PHP and JavaScript program source code from the prying eyes of my client. How can I do that?
If someone has access to your source code it will always be susceptible. The best you can do is obfuscate it ala Google-JS style but it can always be reverse-engineered.
And what makes your application so special anyway? Unless it's some sort of program for something like the government I don't think you should really give a care.
your javascript source is fair game I'm afraid. You can minify it, you can obscure it and compress it but you can't hide it.
if you are storing PHP files on your clients server, then this issue will be difficult to overcome also.
Apparently there are some PHP encrypters available but they have an adverse affect on performance.
So yeah, not much you can do really. Especially if your client is technically savvy.
Use a javascript obfuscator.
Jasob :: JavaScript Obfuscator - CSS Obfuscator
Although it won't be 100% irreversible. Just makes it hard to read and understand.
For PHP
and
Given you are using a scripting language that is interpreted at runtime, your options are limited:
1) Run the most sensitive parts of your application on your own server and have the client access them over web services.
2) Code obfuscation (this is reversible with enough effort).