Turning PHP Scripts Into Executables: PHP Apollo

PHP Apollo is a free command-line tool that converts a PHP script into an executable, as a compiler can do (but this is not a PHP compiler). The executable may works on any computer without the need to install PHP. A part of the interpreter is already included into the executable to run your PHP code.

License

Freeware.
Use and distribute it freely, but don't remove the copyright.

Limitations

- Include the stuff for an old version of PHP.
- Useful for standalone scripts, not for web pages.
- It is better if the release of the generated executable uses an installer, for now.

How it works?

The PHP code is included into a standard executable file and the PHP interpreter is bring to interpret the code inside the executable file. The PHP necessary stuff is included also.
The PHP code is not compiled into binary and it cannot be entirely, since the most part of a php program is evaluated at runtime and cannot be compiled. A PHP compiler must include a kind of interpreter to process variables at runtime. The real advantage of a PHP compiler is to protect the code from copy.

PHP Apollo and Scriptol

Scriptol C++ compiles actually a Scriptol source in binary. Your scripts may be interpreted or compiled, as Scriptol has typed variable. The execution speed is increased greatly.

For dynamic variables, they have to be interpreted at runtime, with a kind of embedded interpreter, the process time is the same as for the interpreter.

Read the README file included in the archive for more infos.

Download



Home
Forum

Apollo and parameters

2009-01-05 07:29:21

user090105

Hi, may I ask you a question? I was playing with Apollo and I did the following:
<?php
$string="var1=peter&var2=annie";
print $string;
?>
Then I tried to call it (that is: an executable created starting from this code) from a Flash client via the LoadVars API.
var lv = new LoadVars();
lv.onLoad = function(success){
  if(success){
  trace(this.var1);
  }
    else
  {
  trace("loading issue");
  }
}
lv.load("mytest.exe");
The ActionScript docs don't talk about loading variables from executables (you can do it from txt and serverside scripts) BUT I get an "undefined": this means something gets loaded (elsewhere, there should appear a "loading issue" in an output window). Could you tell me if there's a way to get my variables loaded the right way?
2013-05-02 15:20:12

webmaster

Time to go to node... Node.js