A free, private, in-browser PHP playground
php.onl runs real PHP — not a simulation — using a WebAssembly build of the PHP interpreter. Your code never leaves your device: execution, history, and sharing all happen client-side, so it stays completely private and keeps working offline once loaded. There is no signup, no account, and no server round-trip. Pick from PHP 7.2 through 8.5, write some code, and run it instantly — or select several versions at once to compare their output side by side. It is built as an installable Progressive Web App, so you can add it to your home screen and reach for it like a native tool whenever you need a quick PHP scratchpad.
What you can do
- Run real PHP code in your browser with zero setup or signup.
- Execute several PHP versions in parallel and diff the results.
- Pass STDIN and command-line arguments to your script.
- Format code, save a local snippet history, and reset in one click.
- Share a runnable snippet with a single URL — the code rides in the link, not on a server.
- Embed a read-only runner in docs or articles via the embed view.
See all features or read the quick-start docs.
Every PHP version, side by side
php.onl ships PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5. Each version is a separate WebAssembly runtime, so you can test how the same snippet behaves across releases — handy for checking deprecations, new syntax, or a fix before you upgrade a real project. Browse the PHP versions — including dedicated pages for PHP 8.5, PHP 8.4, and PHP 8.3 — or learn about the language at php.net.
Private by design, offline by default
Because the interpreter runs entirely in your browser through WebAssembly, nothing you type is uploaded or logged anywhere. After the first load the runtime is cached, so php.onl keeps running with no network connection at all. That makes it safe for pasting sensitive code and reliable on a plane, a train, or a flaky connection. Read more on the privacy page.
FAQ
Is this real PHP?
Yes. It runs an official WebAssembly build of the PHP interpreter, so language behaviour matches a real PHP CLI.
Do I need an account?
No. There is no signup and no login — open the page and run code immediately.
Is my code sent to a server?
No. Code executes locally in your browser and is never transmitted. Share links encode the code in the URL itself.
Which PHP versions are supported?
PHP 7.2 through 8.5, and you can run multiple versions at the same time to compare output.
php.onl is powered by php-wasm, the PHP-in-WebAssembly runtime from the open-source WordPress Playground project.