如何保护源代码? [关闭]

I am developing a system in Zend Framework for a company and once its finished I want to sell this system to other companies as well.

The problem here is that the first company whom I am going to sell the system has its own IT department so I suspect they will make some tweaks in the system which I developed and start selling it to other companies.

My question here is that how can I make this system in such manner that it take a lot of time and effort to analyze and is hard to understand?

I all ready know about the confusing directory structure...but looking for other alternatives..

And also according to contract I have to give them raw source code.

It seems as if you have opposing ideas. If you are worried about them taking your code, then you shouldn't sell it to them. There is no way to have unencrypted source code, and keep it a secret at the same time. But, to answer your question, I recommend you take a look at the javascript that google uses on gmail, or any of their other web apps, you'll notice that all of their variable names have been not only minified, but renamed to things like "var a, b, t;", instead of variable names like "var alpha, beta, theta;". So you could "disguise" your code in this way to make it less readable, but that isn't really doing much, since any skilled and determined developer could figure it out.