Cyberborean Chronicles

Eclipse and PHP

I am not a hardcore PHP developer, but eventually I deal with writing, fixing or managing some PHP code. Recently I got in development of custom Drupal modules so PHP appears to be my primary language now.

I should say I am old fan of Eclipse IDE. It is my only IDE for Java development since 2.0 version (2001?) and also for Python some time ago. Because of my sporadic PHP experience before, I never had an idea of using Eclipse for PHP development but the time has come and I installed PHPeclipse plugin.

What is good

In general, benefits of using a special development environment against a common text editor are obvious. But there is what I especially liked:

  • A sence of home
    Only the fact of being in familiar, friendly working environment helps to get into the productivity flow. I should reward PHPeclipse team for they avoided of reinventing the wheels and made everything looking and behaving almost like in default Java mode.
  • On-the-fly code parsing and finding the problems/errors works for PHP and helps to produce clean error-free code (not so much as for Java, but PHP has more liberal grammar, indeed).
  • “Outline” view works and does a great help for navigation through the large files. Familiar “Ctrl+click” for quick jumping to a function is also working.
  • Code assist works rather well for variables (is activated when a user hesitates after typing ‘$’).
  • Code formatter works.
  • Full PHP reference is included and integrated into Eclipse help system.
  • PHP debugging: actually is not tested but sounds good.

What is bad

  • There is no “PHPdoc” view similar to “Javadoc” in JDT. It’s very helpful when I go through a unfamiliar API to see an explanation of the imported library function I’ve just typed in or selected in the code. In fact, PHPEclipse can parse PHPdoc comments in the included files but displays them only as those fixed-size “hovers” – it is rather useless.
  • “Quick fix” feature is disabled all the time (have no idea whether it is implemented)
  • Code assist for functions works by unobvious way – I should type ‘?’ to get the list of available functions. Function arguments are not prompted as in Java mode.
  • There is no refactoring tools (like those in JDT)

Leave a Reply