2

Is it possible to convert PHP to binary mode (compile) and run it in all standard web servers?

5
  • 1
    What's a "standard web server" ? Commented Jan 24, 2010 at 19:04
  • Would this be to (1) try and obfuscate your code to keep it secret, or (2) or to run it on webservers without PHP? I'm guessing (1) Commented Jan 24, 2010 at 19:04
  • Assume that it should run on a typical shared hosting plane where you don't have root access, and have to use Apache or IIS. Commented Jan 24, 2010 at 19:05
  • 1
    And what exactly is "binary mode (compile)"? byte code or machine code? Commented Jan 24, 2010 at 19:07
  • Ah, now I get it. You want to compile your PHP code. I thought you want to compile PHP itself (i.e. the PHP interpreter). Commented Jan 24, 2010 at 19:07

4 Answers 4

2

There are various PHP accelerators that cache the compiled byte code the interpreter produces. Not sure if they will run without the source still on the server though - I've never tried!

Sign up to request clarification or add additional context in comments.

Comments

1

One Facebook developer is working on a compiled form called "Hyper-PHP", and it's not even clear if that will be an open system once complete, but no solution exists yet.

Comments

1

PHP Will never be a compiled Language. It will stay as an Interpreted Language. @Matchu Facebook is just Promoting their site, so this is just an Promotion action of Facebook

1 Comment

Huh? Of course Facebook is going to brag about it. Are you saying that they aren't working on the ability to compile PHP scripts?
1

There is a number of tools that will convert your php source to bytecode and allow you to protect your source code. Some of the more popular ones are Zend Guard by Zend and Ion Cube encoder. You will still need their respective loaders installed on the target server for them to function.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.