.

What is the Best PHP IDE and Editor and How to Select the Right Tool?

In the developer's work, it's important to write good-quality code efficiently. We may try to handle everything by ourselves or use the tools that facilitate and accelerate our work. There are many available solutions on the market, so we've decided to make the choice easier for you and suggest what to pay attention to when looking for this type of software, and which specific systems you should be interested in.

PHP IDE vs an editor – what's the difference?

IDE (integrated development environment) is software that combines many functionalities. Thanks to this, we have a code editor, tools checking its correctness, and a debugger at hand.

A code editor is an ordinary "notebook" extended with syntax highlighting. This tool is useful for editing individual files and writing simple scripts. On the other hand, an integrated development environment is much more advanced and designed for larger projects. It's also worth mentioning that an IDE is usually a piece of software that requires more computing power from the computer than an editor.

How to choose the best IDE for PHP and editor?

The main factor of choice should be popularity, and hence – the number of people who use a given tool. If a lot of users use particular software, we have a greater chance that its developers will release regular updates and new functionalities. You can easily check the popularity level by entering the name of the tool in the YouTube search engine, for example. Using the sorting by the date of addition, we can check how often the materials about a particular tool are published. The more content there is, the more we can count on the fact that when a problem or question arises, we'll be able to find a solution (the number of views of a video also says a lot).

It's also worth paying attention to the solutions that make it possible to install extensions in order to increase functionality. We’re talking about the add-ons that facilitate the work with a given framework (e.g. creating a project using a wizard), add or improve debugging, or check the quality (compliance with standards) of our code. Stability and speed also are important factors. We want the tool we use to make our work easier, not slow it down.

The best free PHP IDE

Free solutions are perfect at the beginning of our programing adventure. The popularity of the PHP language means that we have a lot of free software to choose from, which offer a lot of functionalities and won't limit us even during larger projects. Free IDEs are often open source, which can be a big advantage for some users. Unfortunately, this can also translate into less frequent updates and support provided only by the community that uses the tool. We can't count on quick help from the software creator, who has a dedicated department in his company for this.

There is also software that is free for private use only or has limitations that disappear when you purchase the full version. We should keep this in mind if we intend to implement projects that are going to make money.

Apache NetBeans

This is a free and open source PHP IDE available for all operating systems – Windows, Mac OSX and Linux. This tool was developed in Java and allows editing Java, PHP, HTML, CSS, and JavaScript code. We can extend the functionality of Apache NetBeans by installing plugins. There aren't many of them, but we may find something simple – such as the autosave function, or more complex extensions adding, for example, a CSV file editor. NetBeans has built-in support for xDebug (a project debugging tool) and PHP_CodeSniffer (a tool for checking our code against the coding conventions). The advantages of this solution are regular updates and a relatively simple interface, making it a good choice for beginners. The disadvantages include the long start-up time and high resource consumption in the case of larger projects.

Apache NetBeans, a free PHP IDE, has a simple interface

 

Eclipse

Like the previous integrated development environment, Eclipse is also an open source tool. It allows creating code in many languages, including C, C ++, Java and, – of course – PHP. We can run this IDE on all three popular operating systems. It handles even large projects well and has a very extended configuration allowing it to be adapted to your needs.

Eclipse offers basic functions such as autocomplete and debugging. At the moment, it isn't able to work with PHP_CodeSniffer. The latter requires installing an additional plugin, which is no longer available. Another downside is that Eclipse may run slowly due to poor memory management.

The interface of Eclipse - the open source integrated development environment

 

The CodeLobster IDE is also worth mentioning. Its free version is quite a nice tool. Unfortunately, many functions that may be useful (e.g. support for version control systems, code formatting, FTP/SFTP connection support, or support for popular CMSs) are reserved for its paid counterpart.

Paid IDE for PHP – PhpStorm

PhpStorm dominates this category of integrated development environments. This system was created with PHP code editing in mind. It's intended for professionals, but even novice developers will feel comfortable using it. It greatly facilitates and speeds up work thanks to its built-in integration with popular frameworks and CMS systems, including Drupal. It also has code autocomplete, built-in refactoring, and automatic comment creation options. It implements a whole bunch of code quality checking tools as well. Recently, JetBrains also added a new feature called Code With Me, which allows you to develop and debug software remotely with your team. This is the IDE we use at Droptica.

Unfortunately, this product isn't cheap. The initial cost of a license valid for one year is €89 and drops after 2 years to €53. Despite its enormous advantages, the disadvantage of PhpStorm is the computer requirements. JetBrains recommends 8GB of RAM, a multi-core processor, and a fast SSD. But even with good hardware, indexing a large project may take a while and the fans in our computer may go into high gear.

The interface of PHPStorm, a program that dominates the market for the paid PHP IDEs

 

The best free PHP editor

In our opinion, the best tool in this category is Visual Studio Code. It's an open source code editor developed by Microsoft. The biggest advantages of this solution are its popularity and versatility. Its users create countless extensions, which makes it an editor for all kinds of files – even large ones (I managed to open a 4GB file in just over 50 seconds). We can also write in any language we choose. Additionally, it's worth mentioning its very good integration with WSL (Windows Subsystem for Linux). Using the available plugins, VS Code is able (after proper configuration) to match the functionalities (code quality checking, autocomplete, debugging, etc.) of some IDEs.

A great advantage of VS Code is its ecosystem. The tool is developed by Microsoft, which has been the owner of GitHub since 2018. While on the page of any GitHub repository, such as Droopler, we can click the dot and run VSCode in the browser to browse the code more easily. Unfortunately, it's difficult and time-consuming to configure this piece of software perfectly. It's worth giving it a chance, though.

The interior of a free PHP editor - Visual Studio Code

 

Paid PHP editor

There are also paid code editors available on the market. Sublime Text is the flagship example here. It's more of a replacement for simple text editors. It launches very quickly, making it perfect for introducing quick changes to individual files. It also has syntax highlighting for a huge number of file types. You can install many extensions for it – ranging from different themes to debuggers. We can use xDebug or CodeSniffer in it, but setting them up is more complicated than in other solutions. The Sublime Text license costs $99. It's worth adding that Visual Studio Code offers the same functions as this editor. The advantage of Sublime, however, is its startup time – it launches almost immediately, while the latter tool needs 1-2 seconds.

The interface of Sublime Text - a paid PHP editor

 

The best PHP IDE and editor – summary

There are many solutions available on the market, and each of them has its advantages and disadvantages. If you're starting your adventure with programing, we recommend leaning towards text editors e.g., VS Code. This'll allow you to focus on learning the PHP programing itself, not on working the software out. On the other hand, if you intend to start programing (e.g., developing projects in Drupal) on a professional level, a good IDE is a must. However, everyone has their own preferences, so try out a few solutions and find the one that works best for you. You'll be spending a lot of time with it after all.

3. Best practices for software development teams