logo
Instead of re-parsing the php script every time we want to execute it we can just compile it once and run it multiple times:
Compilable comp = (Compilable)eng;
CompiledScript script = comp.compile(src);

for (int i=0; i<5; i++) {
  System.out.println("executing " + i);
  script.eval();
}
see: CompileSample.java

Comments

Add Comment

name:
email:
homepage:
comment:
Please enter the following code into the "verify" field below:
Verify: