I need to encrypt some PHP source that I've released to the public.
Is this possible? Can PHP be "compiled" ?
In PHP, Encryption and Decryption of a string is possible using one of the Cryptography Extensions called OpenSSL function for encrypt and decrypt.
The short answer is "no". The current implementation of PHP is that of an interpreted language.
You can buy Zend Guard to encode your PHP sources, and then use the Zend Optimizer to run it. There is an opensource/free PHP compiler project as well (bcompiler, and also take a look to this) but I never used it because at the time I needed it the project was still incomplete.
You can have a look at phc which can generate executables from PHP. It also has some other options to create C-code, XML, optimized PHP, etc. from the original PHP source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With