There is no perfect scheme for protecting your PHP code if other people have access to the server. Even if the source is encrypted, the server must hold the key (somewhere) to decrypt the source before running it.
If you have some source code or functionality you'd like to protect, you'll probably need to run your own server as laserlight suggested and consider making the functionality accessible via API or something.