views:

106

answers:

3

i'm wondering about this possibility. Is it possible to make our code written in code and string compile and make it become Executable and can operate without the use of server such as Apache.

The OS environment will be Windows family.

+2  A: 

I've never tried it, but you could take a look at PHC. It appears to be able to do just that.

Also take a look at Hip-Hop by Facebook. Looks good (and more recent).

Edit: And for more PHP Compilers, see Wikipedia

St. John Johnson
But hiphop will probably not work with windows
Pascal MARTIN
Hip hop still requires a webserver such as apache.
Billy ONeal
@Billy : are you sure about that ? I thought it was implemented its own threaded server (the generated executable being the server, that only serves the compiled application)
Pascal MARTIN
Pascal MARTIN: Actually you might be correct about that -- it behaves as a server itself.
Billy ONeal
+1  A: 

There are some application which compress your application, a web browser and PHP into an executable file. This way it works like an application.

If you want write an application in windows using PHP you can try PHP windows bindings http://winbinder.org/ . It looks promising

Also I have found two windows compilers for PHP while googling (I did not use them).

Sinan
A: 

The existing answers cover the bases fairly well for possible ways to compile your php code into an executable. That said, you may not have to go to those lengths, based on your question.

If all you are looking for is a way to execute php scripts in Windows away from an Apache server, then all you need to do is install php to your Windows machine. Then you can run any php script from the command-line by simply typing > php script.php

You can download the Windows installation package for this from http://windows.php.net/download/

JGB146