Everything php.onl can do
php.onl is a free, in-browser PHP playground built around one idea: run real PHP — not a simulation — without a server, an account, or your code ever leaving your device. Here is what that gets you.
Real PHP, powered by WebAssembly
Your code runs against an official WebAssembly build of the PHP interpreter (the same php-wasm runtime that powers WordPress Playground). Language behaviour matches a real PHP CLI: the same functions, the same error messages, the same edge cases. Nothing is mocked or approximated.
Every PHP version, 7.2 through 8.5
php.onl ships nine independent runtimes — PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5. Each is a separate WebAssembly module, so you can run the exact release you care about and trust the result. See the full list on the PHP versions page.
Run several versions at once, side by side
Select multiple versions and a single Run executes your snippet on all of them in parallel. The results panel lays the outputs out together and flags where they differ — the fastest way to spot a deprecation, a behaviour change, or a fix before you upgrade a real project. Learn more in Test PHP deprecations across versions.
100% client-side and private
The interpreter runs entirely in your browser. Nothing you type is uploaded, logged, or sent to any server — execution, history, and sharing all happen on-device. That makes php.onl safe for pasting sensitive or proprietary code. Read the full story on the privacy page.
Works offline as an installable PWA
After the first load the runtime is cached, so php.onl keeps working with no network connection at all. It is an installable Progressive Web App: add it to your home screen or dock and reach for it like a native scratchpad — on a plane, a train, or a flaky connection.
Built for real work
- STDIN and command-line arguments — feed input to scripts that read from
php://stdinor$argv. - Code formatting — reformat your snippet in one click.
- Local snippet history — your recent runs are saved on-device (never uploaded), capped so it stays tidy.
- Shareable links — share a runnable snippet with a single URL. The code is compressed into the link itself, not stored on a server.
- Embeddable runner — drop a read-only PHP runner into docs or articles via the embed view.
- Light and dark themes — with syntax highlighting that follows your theme.
No signup, ever
There is no account, no login, and no paywall. Open the page and run code immediately. php.onl is free and accessible to anyone with a modern browser.
Ready to try it? Open the playground →