justjoe
justjoe

Reputation: 5564

Is there any way to compile our PHP code into executable file

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.

Upvotes: 4

Views: 1796

Answers (3)

Jeffrey Blake
Jeffrey Blake

Reputation: 9699

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/

Upvotes: 1

Sinan
Sinan

Reputation: 5980

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).

Upvotes: 2

St. John Johnson
St. John Johnson

Reputation: 6660

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

Upvotes: 4

Related Questions