Code Eclipse

Code Eclipse is quite old and is no longer supported. You're still welcome to use it, and it still works (for the most part) with PHP4 compatible code. It does not understand objects, namespaces, and newer built in functions. Eventually I may get around to updating it, however for now it's offered "as is".

Code Eclipse is a PHP obfuscator. It turns normal, easy to read PHP code into gibberish, with little to no loss of speed and no loss of compatibility. I developed Code Eclipse because I needed a way to hide the source code for one of my scripts as much as possible while still retaining 100% compatibility with PHP servers. Other options like Zend Encoder work great for people who have control over their servers, but I wanted to reach the entire PHP audience, which includes a LOT of people who don't admin their own servers.

[ click here to skip the details and obfuscate your own script now ]

In the process of looking for a decent PHP obfuscator all I could find were commercial scripts (retailing for upwards of $250) and a couple free ones that just didn't do as much garbling as I wanted. Even many of the commercial ones produce output that's difficult, but still possible to read without any translation. Specifically they still used PHP's function names and didn't obscure strings, making it relatively easy to guess what the functions were doing.

Code Eclipse is NOT an encryptor. Some products out there (like Zend Encoder) actually encrypt your code. This is good and bad. It's good because your code is further protected against theft. It's bad because encrypted code requires special modules to run, and, while those modules are usually free they are not installed on the majority of servers, which means administrator intervention will be required to get it running. If you're distributing a $2000 script to a select list of clients, then you should probably be using an encryptor to safeguard your application because chances are you have influence over what software their server will be running. For the rest of us there's services and products like Code Eclipse.

(Note that there are also some products out there that claim to encrypt code with no modules needed. Read the fine print carefully and get a techie's opinion before purchasing said product. I have yet to see anything that's anywhere near secure, or, for that matter, even a deterrent. One I found simply zipped the code into a password protected zip file, and then unzipped it on EVERY PAGE LOAD. Of course the password was being stored in the "decryptor" script, so all you need to do is open it up in your favorite zip software and type in the password to access the code. This and they estimate a 1 to 3 SECOND additional load time, EVERY TIME the page is hit, in order to decompress / decrypt the page!)

Code Eclipse is currently in beta and is (for the moment) a free service. It should be pretty safe to use on your code (eg: it should produce executable code with no modification) however if you find bugs please let me know and I'll see what I can do to fix them. Currently it garbles variable names (except for super globals such as $_SERVER), user function names, php function names, array keys, double quoted strings, and heredoc strings. Due to the way PHP interprets single quoted strings there's not much we can do to garble them, so if you want to reveal as little as possible use double quoted or heredoc strings. It does a few things to make the code even more unreadable, including creating variables with the same names as functions and vice versa, multiple (randomly selected) methods of encoding string characters, etc. And of course it removes all comments and any non-critical white space (line breaks and spacing inside a string is left alone). It's not optimized fully yet so it will probably increase the size of your code slightly. I have a few ideas to fix that (hopefully getting the code size smaller than your original) as well as making things even more difficult to reverse engineer. When I get a moment I'll implement them.

Click here to obfuscate your PHP code...