Even working with free software, we often need to protect our code.
There are good tools there (proprietary) for this, is that I use Ioncube.
But even if go deep in the proprietary world, you must use licenses with expiration limit per machine, domain, etc..
Herein only the proprietary tools provide that, but are expensive (Ioncube itself).
Researching the subject, I found an old class, but very well done. I updated the code, applied codding standards and some docs and PADL was "reborn": PHP Aplication Distribution Licensing.