To write high-quality PHP code, you’ll need a high-quality PHP editor that best fits your programming needs, preferences, and workflow. There are many options available in the market, and while they might look the same at first glance, each PHP editor has its unique features and optimal use cases.
In this guide, you can find the best PHP editors that can help you edit PHP files and develop, debug, and test PHP applications.
What Is a PHP Editor
Technically speaking, you could edit PHP files with a basic text editor such as the Notepad app on Windows, but it wouldn’t be an easy thing to do. The main problem is that source code files are hard to read without syntax highlighting that lets you see different code structures, such as variables, keywords, and parameters, in different colors and fonts.
Low code readability doesn’t only lead to multiple errors but also slows you down as a programmer, as it will take much more time to see through your code and figure out the next step. To edit PHP files effectively, you’ll need a source code editor that understands the PHP syntax and highlights every piece of code according to its meaning.
Although syntax highlighting is the number one feature of every PHP editor, it’s not the only one. The best PHP editors come with multiple additional functionalities that help you write and edit PHP code, make sense of the structure of your file and project, and make fewer errors. For instance, line breaks, indentation, auto-complete, different views and editing modes, code completion, search and compare functionalities, and smart code hints are such features.
In addition to these advanced editing functionalities, modern PHP editors also have capabilities that help you with other tasks such as debugging, version control, refactoring, and others.
Note that most PHP editors are not solely for editing PHP files, but they are generic text editors that come with syntax support for many other source code file types too. For example, if you have edited HTML files before and already have a go-to HTML editor, there’s a good chance it will support the PHP syntax as well and you can keep using it if you want to.
5 Best Free PHP Editors
The best free PHP editors that provide you with all the important features to read, create, and edit PHP files.
1) Visual Studio Code
2) Atom
3) Brackets
4) Notepad++
5) RJ TextEd
1) Visual Studio Code
Supported operating systems: Windows, Linux, macOS.
License: MIT License.
Source code: https://github.com/microsoft/vscode.
Supported languages: PHP, HTML, CSS, SCSS, Less, JavaScript, JSON, TypeScript, Markdown, PowerShell, C++, Java, Python, Go, T-SQL, C#, .NET Core, and more.
Visual Studio Code (VS Code in short) is a free and open source code editor by Microsoft that has gained huge popularity in recent years. It supports the PHP syntax by default, and you can download further PHP extensions from the VS Code Marketplace to make it an advanced PHP editor that suits your specific coding needs. You can customize every aspect of VS Code, from themes to key bindings to integrations and functionality.
Best features:
- syntax highlighting, autocomplete, and code navigation.
smart code completion with IntelliSense.
color theme picker.
built-in Git and GitHub integration.
built-in Emmet support.
extensibility (you can create your own extension).
linting, debugging, refactoring.
integrated terminal.
live share for pair programming (with extension).
2) Atom
- Supported operating systems: Windows, Linux, macOS, FreeBSD.
License: MIT License.
Source code: https://github.com/atom/atom.
Supported languages: PHP, HTML, CSS, JavaScript, Java, C, C#, Objective C, Perl, Python, Ruby, Go, XML, and more.
Atom is the “hackable text editor for the 21st century”, according to its slogan. Originally, it was GitHub’s internal tool that later they made open source, but the project is still maintained by GitHub. It’s called hackable because you can customize every single aspect of the editor interface, such as the UI and syntax theme, key bindings, formatting, global and language-specific settings, and more.
In addition to the functionality of the core editor, you can download almost 9,000 packages that allow you to add basically any feature you need. To configure Atom as a PHP editor, you can add PHP-specific packages for debugging, refactoring, annotations, linting, and other development-related tasks.
Best features:
- customizable UI with 3,000+ open source Atom themes.
syntax highlighting and smart autocompletion.
file system browsing and multiple panes.
advanced find and replace tool.
integrated package manager (called apm).
easy-to-access command palette.
extensibility.
real-time code collaboration (with the in-house-built Teletype package).
direct Git and GitHub integration (with the in-house-built GitHub package).
3) Brackets
- Supported operating systems: Windows, Linux, macOS.
License: MIT License.
Source code: https://github.com/adobe/brackets.
Supported languages: HTML, CSS, LESS, SCSS, Sass, JavaScript, PHP, Java, Python, Perl, Ruby, C, C++, VBScript, and more.
Brackets is an open source code editor created and maintained by Adobe. As many of Adobe’s products, it primarily focuses on frontend development, but it supports several backend languages as well, including PHP. It has become popular for its inline editing feature for CSS that lets you see all the selectors belonging to a specific CSS rule.
If you do both frontend and backend development, Brackets can be the ideal PHP editor for you — especially if you also work with CSS preprocessors, such as Sass and LESS. That being said, Brackets is not the most advanced PHP editor in this list, but it’s free, lightweight, and easy to use.
Brackets has an extension registry as well, however, it doesn’t have as many extensions as Atom or Visual Studio Code.
Best features:
- vertical and horizontal split view.
live preview using a real-time connection with your web browser.
lightweight (written in JavaScript).
inline editing (for CSS).
custom themes are available via the Brackets Extension Registry.
support for CSS preprocessors, including quick edit and live highlight functionalities.
4) Notepad++
- Supported operating systems: Windows.
License: GNU GPL vs 2.
Source code: https://github.com/notepad-plus-plus/notepad-plus-plus.
Supported languages: HTML, CSS, XML, YAML, JavaScript, CoffeeScript, PHP, SQL, Perl, Python, C, C++, and more.
Notepad++ is an oldie but goldie source code editor for Windows operating systems. It was created as a replacement for Notepad, the default text editor that comes pre-installed with Windows operating systems. Notepad++ adds multiple features to the very basic Notepad editor, therefore it quickly became popular among developers working on Windows machines.
It comes with syntax highlighting capabilities for almost 80 programming languages. It’s easy to install, works out of the box, and has important editing functionality such as split view, multiple document interface, undo/redo functionality, and more. So if you need a free PHP editor for Windows that’s easy to use and loads fast, Notepad++ is worth a look.
Best features:
- style configuration options and pre-designed themes.
editing features such as code folding, autocompletion, intelligent code completion, syntax checking, and others.
supports many different character sets.
extensible via plugins.
open source plugins are available for both 32-bit and 64-bit systems.
5) RJ TextEd
- Supported operating systems: Windows.
License: freeware but accepts donations (no particular license is specified).
Source code: not released.
Supported languages: HTML, CSS, Sass, LESS, Markdown, JavaScript, JSON, PHP, ASP, Java, Perl, and more.
RJ TextEd is a one-person project by Rickard Johansson (RJ) — and a really impressive one. It’s a full-featured source code editor for Windows operating systems, created specifically for web development. Even though RJ TextEd’s website looks a bit basic, this is a text editor with many interesting features under the hood.
You can change every aspect of the UI by choosing and customizing a theme, open multiple document views at the same time in different arrangements, and use developer-friendly tools such as a color picker, an HTML validation and repair tool, charmaps, text-to-HTML conversion, and many others. RJ TextEd also has an embedded browser preview (Chrome and Internet Explorer) for HTML files.
The licensing of RJ TextEd is a bit unusual. Although it’s freeware software, it’s not open source, as the author doesn’t want to release the source code. However, you can still extend the functionality by creating an extension. If you have any questions to ask, RJ TextEd has an active user forum too.
Best features:
- HTML and CSS wizards.
browser preview for HTML files.
theme manager with pre-designed themes.
built-in project manager.
regular expression creator.
macro manager.
FTP/STFP client with syncing.
editing functionality such as side-by-side file comparison, advanced. sorting, code folding, auto-completion, and more.