List of online Editors to run PHP online
To run PHP on your own computer you need a web server and PHP, for example from XAMPP (see PHP Installation). But if you just want to try a few lines of code, you do not have to install anything. An online PHP editor lets you write PHP in the browser and run it at once. You only need a browser and internet.
These tools are also called a PHP sandbox, an online PHP compiler or an in-browser IDE. They are very good for learning, for testing a small function, and for checking how code behaves in different PHP versions.
Online PHP editors that work
Paiza.io
A free online editor and compiler for many programming languages, PHP included. You can write the code, run it, save it and share the link. Open Paiza.io PHP editor.
OnlinePHP.io
A PHP sandbox that runs your code on more than 400 PHP versions, from very old ones to PHP 8.5. You can compare the result of up to five versions side by side. It is very useful to see if your code works on the PHP version of your hosting. Open OnlinePHP.io.
3v4l.org
The name means “eval”. It runs a script on hundreds of PHP versions and shows the output of every version, so you can find in which version a behaviour changed. Open 3v4l.org.
PHPTester.net
A simple online tool to run PHP code, where you can choose a PHP version (from 5.6 to 8.3, at the time of writing). Open PHPTester.net.
TutorialsPoint Online PHP Compiler
A simple in-browser PHP compiler that you can use without any signup. Open the TutorialsPoint PHP compiler.
Limits of online PHP editors
- Many of them block functions like
mail(), file writing and database connections for security. - You can not run a full website, with many files, sessions and a MySQL database. For that, install XAMPP or similar on your computer.
- Most of them have a time limit and a memory limit for every script.
How to choose
| You want to | Use |
|---|---|
| Run a quick example and share it | Paiza.io |
| Check the code on different PHP versions | OnlinePHP.io or 3v4l.org |
| Learn the basics and practice exercises | Any of them, and then install PHP on your computer, see PHP Installation |
After you try the basics online, practice the PHP exercises and read the PHP tutorial.
Note: we removed two old tools from this list (WritePHPOnline and the old OnlinePHPFunctions sandbox), because they are not working anymore.
| Tutorials |
|---|
| No Content Found. |
| Exercises & Assignments |
|---|
| No Content Found. |
| Interview Questions & Answers |
|---|
| No Content Found. |