Here's my opinion, and or theory.
Java uses the client side to things, while php do things on the server side. I'm not sure if JAva could do this, but it's nearly impossible to steal php scripts installed on a server unless the MIME is installed incorrectly or the script is given away. (Hard to find server code)