Run any PHP version in your browser — no server, fully offline

Published 2026-06-11

Most online PHP tools work the same way: you type code, it gets sent to a server, the server runs it, and the output comes back. php.onl does something different — it runs real PHP in your browser, with no server in the loop at all. Here is what that means and why it is useful.

Real PHP, compiled to WebAssembly

php.onl runs an official build of the PHP interpreter that has been compiled to WebAssembly — the same php-wasm runtime that powers WordPress Playground. Because it is the actual interpreter (not a re-implementation), language behaviour matches a real PHP CLI: the same functions, the same warnings, the same edge cases.

The interpreter executes on your device. There is no backend that receives your code, which has three immediate consequences:

  1. Your code stays private. Nothing is uploaded or logged. See the privacy page for the full picture.
  2. It works offline. Once the runtime is cached, php.onl keeps running with no network at all.
  3. There is nothing to sign up for. No account, because there is no server-side anything to attach an account to.

Nine versions, all on tap

php.onl ships PHP 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5 — each as a separate WebAssembly module. The first time you select a version, its runtime downloads with a real progress bar; after that it is cached and loads instantly, even offline.

That range matters because PHP code does not behave identically across releases. A snippet that relies on property hooks or the pipe operator simply will not parse on 7.4. Having every version one click away turns "I think this works on 8.1" into "I just ran it on 8.1."

Run several versions at once

Select multiple versions and a single Run executes your snippet on all of them in parallel. The results panel lines the outputs up together and flags where they differ. We wrote a whole guide on this workflow: Test PHP deprecations across versions.

An installable, offline scratchpad

php.onl is a Progressive Web App. Install it from your browser and it launches like a native tool, working on a plane, a train, or a connection that keeps dropping. For a quick PHP scratchpad that is always available and never phones home, that combination — real PHP, every version, fully private, fully offline — is hard to beat.

Want to try it? Open the playground →, or skim everything php.onl can do.