well it's a non compiled language so it's hard without things like ioncube, but you could obfuscate the code so it's "unreadable" the developer than at least would've to work for it ;)
you could use an online callback and so on but you're in a script language so basically the answer is ... you don't unless you use a binary that's delivered with your php code which is actually compiled ....