How to start working with PHP and Eclipse

There are several options to code on PHP over this post we are gonna see how to setup some of them in Eclipse as well as see another option:


First of all we have to talk about the default options that we´ll find with Eclipse nearly outofthebox.

PHP Integrated Development (PDT)

The PHP IDE project delivers a PHP Integrated Development Environment framework for the Eclipse platform. This project encompasses the development components necessary to develop PHP-based Web Applications and facilitates extensibility. It leverages the existing Web Tools Project in providing developers with PHP capabilities.

The easyway to install PHP Development Tools (PDT) on Eclipse is the option Install new software... on the help menu that will show us a modal window as you´ll see on the image below, where we can install the software we need.

I´ve selected an extra option the JUnit Tests extension to help us to create our Unit Tests

PHP Tool Integration

They have a good intro that explain perfectly what we gonna find with this plugin and differences between thos one and the last one.

On one site there exists many good PHP tools such as PHPUnit or PHP CodeSniffer which support the development of PHP scripts. On the other side there powerful IDEs for example PHP Delepment Tools Project (PDT) but mostly with no possibility to use such tools with them. The Eclipse PHP Tool Integration (PTI) is a collection of Eclipse plugins which aims to close this gap.

The mayor problem with PHP Tool Integration (PTI) is that actually no under mantain and the last version is from over a year old, however a lot of thinks are working and we can use it in conjuntion with our first option.

If we wanna install it we can just follow their instructions or simple add to our site sources and install the extension that we need.

Other options


Probably the second best option and in some scenarios the best one if we are not considering a payment option.

Actualy I´m working with CakePHP framework and I´m planning to use this plugin to integrate CakePHP on Netbeans.

As well as this other to autogenerate template code easily.

Update: Related post

How to sniff our CakePHP code with Eclipse

Stackoverflow Question: How to setup PHP CodeSniffer + Formartter profile for CakePHP in Eclipse?