title: Calling PHP from Java
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/614894/invoking-a-php-method-from-java">invoking a php method from java</a>  </p>
  </blockquote>
  
  
  
  <p>I am writing a Java class. And I have some logic in test.php.
  One of the methods of that Java class should invoke test.php,
  so that test.php performs some computation and returns the result to the invoking Java method. Can I do that with something like the following?</p>
  
  <pre><code>Runtime rt = runtime.getRuntime();
  process exec = rt.exec(test.php);
  </code></pre>