Overview
The PHP Sandbox at OnlinePHP.io lets you run a snippet of PHP without installing anything. You type code into an editor, press Run and see the output. What sets it apart is the range of interpreters: the site offers more than 400 PHP versions going back to PHP 4, and you can select up to five at once to compare how the same code behaves in each.
That makes it useful for checking whether something works on an old server, seeing exactly when a function or warning changed between releases, and sharing a reproducible example in a bug report or forum answer. You can set the error reporting level, show output as plain text or rendered HTML, beautify the code, load a file, download the code, and save or share a snippet by link. The editor has themes, syntax checking and function-name autocompletion. A companion section lets you try individual PHP functions.
Code runs on the site's servers, not in your browser. To prevent abuse, network access is rerouted and limited, filesystem access is restricted and scripts are cut off after a few seconds. The site is maintained by one developer and paid for by ads and donations. Running code needs no account; logging in lets you keep saved scripts, and a donation gives a year of premium, which removes ads and the save captcha and raises storage limits.
Categories
Features
- Runs PHP code on more than 400 versions from PHP 4 onwards
- Compare output across up to five versions in one run
- Selectable error reporting level
- Output as plain text or rendered HTML
- Save and share snippets by link, load a file or download the code
- Code beautifier, syntax checker and function autocompletion
- Light and dark site themes and many editor themes
- Separate pages for trying individual PHP functions
Privacy
See the official privacy policy. The about page explains that your code is sent to the site's virtual servers to be executed; an auto-save option stores your last code in your own browser.
Pros & Cons
Pros
- Very wide choice of PHP versions, kept up to date with new releases
- Side-by-side version comparison is handy for upgrade testing
- No account needed to run code
- Premium is pay-what-you-want by donation
Cons
- Code is sent to and executed on the site's servers
- Short execution time limit and restricted network and filesystem access
- Ads on the page unless you have premium
- Saving code involves a captcha, and free saved-script limits are lower
Community Reviews (0)
No written reviews yet — be the first to rate this tool.
Similar Tools
-
Sandboxes · SQL Fiddle
Tests and shares SQL queries in the browser across database engines.
Free No Signup Web -
Tests and shares SQL queries in the browser.
Freemium No Signup Web -
Sandboxes · SQLite Online
Runs SQLite queries in the browser.
Free Web -
Sandboxes · TutorialsPoint Coding Ground
Runs code online in 90+ languages.
Freemium Web