Programming with PHP in Eclipse

PHP is an open source general-purpose scripting language that is great for web development and can be embedded into HTML. PHP is mainly used in three areas: server-side scripting, command line scripting, and desktop applications. If you would like to include PHP in Eclipse, CodeMix provides all the tooling you need, from coding support to debugging.

CodeMix is an Eclipse plugin that provides core PHP support, plus the option to add Code-compatible extensions directly into Eclipse—install any number of popular PHP extensions to further enhance your PHP coding experience. CodeMix is compatible with Eclipse-based IDEs and tools like MyEclipse, Spring Tools Suite, and JBoss Tools, so you can continue working in the environment you are accustomed to.

PHP Highlights

Take a look at some of the exciting features CodeMix offers the PHP developer and then check out the Getting Started guide that includes everything you need to know before starting your PHP development with CodeMix. 

IntelliSense & Snippets

With the PHP IntelliSense extension you get  helpful code completion, a workspace-wide symbol search to quickly navigate code, and much more! Snippets quickly produce commonly used bits of code, and you can add PHP snippet extensions to make your coding even more productive. 

Eclipse Oxygen + CodeMix + PHP IntelliSense extension

Coding Standards

What coding standards do you use within your team? PSR2, PEAR, Zend, or something custom? Defining a standard is important—especially in team environments. The php CodeSniffer extension allows you to specify a standard, as well as configure severities for different types of violations.

php in eclipse: coding standards
Eclipse Oxygen + CodeMix + php CodeSniffer extension


The CodeMix Extension Manager makes it easy to get everything you need for superior PHP programming.  From the Extension Manager, simply browse for the PHP pack.

CodeMix Extension Manager

PHP Project Wizard

Go to File>New>Project>CodeMix and select Php Project to create a new PHP template project. The wizard makes it simple by installing any missing PHP extensions

New PHP Project wizard


As-you-type validation checks your code immediately, no saving required! With the php CodeSniffer extension, the variable analysis module will let you know if you have unused or undefined variables.

php in eclipse: validation
Eclipse Oxygen + CodeMix + php CodeSniffer extension


Whether you’re debugging a web application or a utility you’ve written, with the PHP Debug extension and Xdebug, you get the same robust and capable debugging experience that you’ve come to expect from the Eclipse debugger.

Eclipse Oxygen + CodeMix + PHP Debug extension

Additional PHP Extensions

The following PHP extensions will enhance your PHP development experience:

  • PHP IntelliSense—IntelliSense intelligence stepped up a few notches to provide superior suggestions and symbol look-up
  • PHP Debug—Debugging support for PHP
  • php CodeSniffer—Adds coding standards and variable analysis
  • phpfmt – PHP formatter—Formatter for your PHP code, uses phpfmt internally