Scripting Language Source Code Protection
Your javascript source is fair game. I'm afraid. You can minify it, you can hide it and shrink it, but you cannot hide it.
if you store PHP files on your clients' server this problem will be difficult to overcome as well.
There seem to be some PHP encryption devices out there, but these have an adverse performance impact.
So yes, there is not much that can actually be done. Especially if your client is tech-savvy.
source to share
If anyone has access to your source code, they will always be receptive. The best you can do is obfuscate it in Google-JS style, but it can always be reverse engineered.
And what makes your app so special? Unless this is some kind of program for something like government, I don't think you really should care.
source to share
Use javascript obfuscator.
Jasob :: JavaScript Obfuscator - CSS Obfuscator
It won't be 100% irreversible though. It's just hard to read and understand.
For PHP
and
source to share
Given that you are using a scripting language that is interpreted at runtime, your options are limited:
1) Run the most sensitive parts of the application on your own server and ask the client to access them through web services.
2) Code obfuscation (this can be done with enough effort).
source to share