About php.onl

php.onl is a free online PHP playground with one defining trait: it runs real PHP entirely in your browser. There is no backend doing the work — the PHP interpreter itself is compiled to WebAssembly and executes on your own device.

Why it exists

Most online PHP tools send your code to a server, run it there, and send the output back. That works, but it has three costs: your code leaves your machine, you depend on someone else's server staying up, and you usually need an account. php.onl removes all three. The interpreter runs locally, so your code stays with you, the tool works offline, and you never sign up for anything.

How it works

php.onl uses php-wasm — the PHP-in-WebAssembly runtime from the open-source WordPress Playground project — to run an official build of the PHP interpreter inside the browser. We ship nine versions (7.2–8.5) as separate WebAssembly modules, so you can run the exact release you need, or several at once to compare. Everything else — your snippet history, your shared links, your settings — is stored on-device.

What it is good for

What it is not

php.onl is a playground, not a hosting platform. It runs short scripts and snippets — not full web applications, databases, or long-running processes. For that, you want a real server.

Open and credited

PHP is created and maintained by the PHP community at php.net. The in-browser runtime comes from the WordPress Playground project. php.onl stands on their work and credits it openly.

Want the details on what stays private? Read the privacy page, or just open the playground and run some code.