Re: Translatting php to binary...
| From: | Richard Lynch | Date: | Sat, 20 Jul 2002 06:04:24 +0000 |
| Subject: | Re: Translatting php to binary... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108627@lists.php.net to get a copy of this message | ||
>PHP is a scripting language I am pretty much
>aware of that... But is there a way to translate
>php into binary/machine code or would one
>have to write a translator program?
The Zend Encoder (http://zend.com) is a commercial product which is designed
to protect proprietary code, and as part of its current protection scheme, I
believe it turns PHP into a binary byte-code representation. It may or may
not do even more to encrypt the source/binary at some point in the future,
or even now, since I haven't played with it in awhile...
There are other alternatives, but last time I checked they really weren't
"on par" to Zend Encoder for reliability, useability, etc. Again, I haven't
looked hard at this stuff for over a year. YMMV.
NOTES:
If somebody *REALLY* wants to sit there and dis-assemble your Zend encoded
(or any other) binary, they can, but it would probably be easier to run it
and reverse-engineer the behaviour in 99.9999% of the cases.
You will also want a CLEAR license, which is much more important than any
technological hardware/software dongle/boondogle/whatever that's supposed to
protect your code.
If you're thinking you'll get better performance this way, you won't -- At
least not enough to make it worth it. The Zend Engine (the guts of the PHP
parser) is quite zippy, and is not a significant drain on performance. Some
quick hacks to your Apache and PHP C sources will prove this, or you can
just trust me that the Zend Encoder does not significantly improve
performance.
The Zend Cache *WILL* double (minimum) your throughput, however, primarily
by keeping your PHP scripts in RAM, so the hard drive isn't accessed. The
Cache also turns your code into byte-code, and that helps a little, but
binary representation alone won't help performance significantly.
Disclosure:
I used to work for Zend, often answering these very questions as a Booth
Bunny. :-)
YMMV.
--
Like Music? http://l-i-e.com/artists.htm