Article : How to use Eclipse for PHP developers.

How to use Eclipse for PHP developers.


This guide shows how to develop PHP applications using Eclipse PDT.

Install Eclipse and the PHPDebugger.inc
Download and install Eclipse for PHP developers.
Create a PHP project and drag and drop PHPDebugger.inc to your eclipse PHP project.
Activate the PHPDebugger in your php.ini file. Add
auto_prepend_file=PHPDebugger.inc
to your php.ini file.
Test your eclipse project
Drag and drop Java.inc and JavaBridge.jar to your eclipse PHP project.
Create a PHP test script. For example:
define("JAVA_SERVLET", false); define("JAVA_HOSTS", 9267); require_once("Java.inc");

echo new java("java.lang.String", "hello world");
echo  java("java.lang.System")->getProperties();
?>
Run your test script. Click on the run button and wait up to 30 seconds for the first result to appear.
Your PHP script has started a simple Java server in the background and called the Java procedure "java.lang.System.getProperties()".
Develop your PHP/Java application. Change the JAVA_SERVLET and JAVA_HOSTS to use a Java application back end.
For further information please see the PHP/Java Bridge API documentation.