It is always easy to start off with PHP using an online PHP editor instead of setting up everything on your computer. In this article, we will go through some of the best online editors you can use to compile, run, debug, and test PHP. Different editors offer different features and you might need to try out a few to decide the right fit for your requirements.
How it all works…
Getting the final output from PHP is a two-step process where a PHP program is first compiled to the bytecode and then the bytecode is interpreted at runtime by the PHP interpreter. The engine that interprets bytecode is called Zend Engine.
When you edit and run PHP online, you wouldn’t visibly notice the two steps since all of that happens behind the scene, you write a program, run it and see the output live in the browser.
Also check out: PHP Tutorials and Courses
Features of an Online PHP Editor
Going a bit back in history, offline full-featured IDEs used to be the first choice for developers for working on PHP projects. But nowadays, online editors also offer features to manage large scale enterprise-grade projects. Although, you might be looking for a very simple PHP editor just to compile some code snippets given in the tutorials, courses, or classroom assignments.
Before we get into various editors, let us briefly look at what are the key features we need in an online PHP editor –
- The first and foremost requirement is syntax highlighting, including code folding.
- Write code and run with just one click to see output live in the browser
- Work on the same code with fellow students or friends
- Option to embed the code snippets in websites and blogs
- Option to customize theme wouldn’t be bad
- Lightweight and quick response time
- Option to quickly check PHP syntax online
- Option to save, download, share code URLs
- Creating quizzes, coding interviews, assignments
- Code changes and version control
- Integration with git, bitbucket, SVN, SFTP, FTP, and other third-party services
- SQL support and connectors for databases
- Other advanced features are available typically in commercial products.
We will start off with a simple free PHP shell, like phpfiddle, and also cover full-featured commercial online Editors like Cloud 9 which is used for enterprise-grade project development.
1. PHPFiddle: Online PHP Editor
To get a headstart, you get the option to include many ready to use libraries, sample code snippets, and database connections. The best use case of PHPFiddle is the creation of embeddable widgets that you can embed in your webpage or blog. You can create a tutorial, course, or an assignment and add the widget in there to let others edit, run, and try the code snippet.
You can go even a step beyond from widgets and utilize PHPFiddle API to create your own PHP code execution and testing service online.
Before moving onto other free online editors, let us look at what does a commercial product like CodeEnvy has to offer.
CodeEnvy falls under the category of full-featured online PHP editors typically used by professional developers. It provides online development workspaces for individual developers, teams as well as for enterprises.
Red Hat has acquired CodeEnvy, so for sure, it is going to get further upgraded with new features and usability improvements.
Key features include –
- Develop from multiple locations and devices
- Workspaces concept can be used to learn or teach in the classroom
- Mark your code or project as public for others to contribute
- Streamline contribution flow to open source projects
While you can get started with a free version with one click and without the need to add credit card details. The enterprise option brings in many advanced features including integration with LDAP, JIRA integration, VSTS, SVN plugins, APIs, and the option to get hosted workspaces.
This is one of my favorites and provides many features for ease of writing, running, and testing the PHP code in the browser. Some of the key features offered by Repl.it includes –
- Version control and option to roll back the code changes
- Add files and folders to your online PHP project
- Store data and refer in PHP programs using Repl databases
- Multiple Layout options
- Choose between light and dark theme
- Option to enable and disable intelligent coding
- Option to set user interface, font size, colors, etc. and much more
- Pulling and pushing code snippets to git
You can also embed the snippets created on Repl.it into your webpage or use the provided API to create a PHP running execution environment for your own web applications.
4. Rextester – Simple PHP Editor
Key features include –
- Option to set up the layout as horizontal or verticals
- Different Editor modes including Simple, EditArea and codeMirror
- EditArea mode provides options for syntax highlighting, go-to line, search within code, edit in full screen, and a lot more options for ease of PHP editing.
- There is also a code wall where you can showcase the code snippet and check snippets submitted by others
- Share code with friends and fellow students
Restester also provides API that can be used to embed the code editors in your own web applications.
Back to another simple yet elegant online PHP compiler. PHPAnywhre is also an online integrated development editor that brings in real-time PHP editing and execution along with an option of FTP editor.
Key Features include –
- Code indentation, code folding, and syntax highlighting for PHP
- Option to undo and redo the changes made within the browser itself
- Option to find and replace
- Auto-completion and code snippets inclusion
- Option to organize PHP files as projects for ease of management and maintenance.
- Use FTP Explorer to control file permissions
- Option to set up skins as per your liking
- Share projects with others for their contribution or review
Wanted to bring in another commercial product which is Codeinterview, CodeInterview is used specifically for creating and conducting online coding interviews in PHP and many other languages.
Code interview has multiple pricing tiers available including “pay as you go”, Pro, and enterprise. Given below is a snapshot for quick reference to pricing. You can try out the editor trial version for free for evaluation purposes.
Key Feature –
- You can connect with the candidates using Audio or Video calls for interviewing
- Option to replay the code since the entire session can be recorded
- Option to connect your organization using Single Sign-On
- Linux shells to run CLI tools
- The chrome browser extension for one-click interviews
- Option to collaborate with teams
- Option to take private notes while interviewing the candidate
7. JDoodle: Free PHP Compiler with Intuitive Interface
JDoodle supports many languages in the browser and is fast growing in popularity. From a PHP perspective, one can write code with syntax highlighting support, run PHP in the browser, test PHP code online, and see the output in realtime, live in the browser.
Key features include
- Dark and light theme switch
- Full-screen mode
- Option to connect to databases, 2 supported out of the box
- Generate embeddable code to embed snippets in the webpages
- Generate project URL to share with others
You also get the option to utilize the Jdoodle API in the guru plan as well as the option to create assignments for classrooms and online courses.
8. WritePHPOnline: Simple Online PHP Editor
This is the most simple editor out there for doing PHP editing online, you don’t get any clutter or jazzy features either. You can cut/paste code snippets from the assignments or tutorials and run in the provided shell. Well, you can write and create new PHP files from scratch too.
Some basic features include a code beautifier to auto organize the code. One side effect is too many ads that I see on this website, but for something basic and free, you an live with few ads.
Check it out here at – Write PHP Live Online.
9. Cloud 9
Cloud9 is the gold standard for developing enterprise-grade complex projects in the cloud while collaborating with the large remote teams. Even though Cloud9 is the cloud implementation of PHP compiler and editor, It is nothing short of offline PHP IDEs like NetBeans, PHPStrom, Zend Studio, or something like Sublime Text.
It is worth noting that Cloud9 is now acquired by Amazon and is part of aws stack, many large organizations are fully on Cloud9 for their in-house development activities.
The best part with Cloud9 is its seamless support for popular PHP frameworks like Laraval as well as CMS systems like WordPress and Drupal.
You can read more about Cloud9 here at – Cloud9.
There has been a complete paradigm shift in the last few years where everyone is shifting from traditional offline editors to online editors. One key reason for that is the improved connectivity and related tools that provide collaboration among remote teams using text, audio, and video sharing.
Furthermore, advancement and improvements in cloud infra have made sure that there is no lag in editing, compiling, and running code in the cloud. So, this brings in all the advantages of being online without losing the speed and agility that we expect from offline tools like NetBeans.
I hope you got the online PHP editor you were looking out for, do share your experience with PHP online with our readers, via comments!
You might also like: