Run PHP 8.5 online
PHP 8.5 is the latest release, and you can run it right now in your browser — no install, no server, nothing uploaded. Open the playground, pick 8.5 in the version selector, and Run. Because php.onl runs an official WebAssembly build of the interpreter, what you see is genuine PHP 8.5 behaviour.
What's new in PHP 8.5
PHP 8.5 focuses on developer ergonomics and a cleaner standard library. Highlights include:
- The pipe operator
|>— chain calls left-to-right without nesting them inside out.$result = $value |> trim(...) |> strtoupper(...);reads in the order it runs. clonewith overrides —clone()now takes a second argument to override properties while cloning, which pairs naturally with readonly properties:$copy = clone($obj, ['status' => 'done']);.array_first()andarray_last()— grab the first or last element of an array withoutreset()/end()juggling.- The
#[\NoDiscard]attribute — mark a function whose return value should not be ignored, so the engine warns when a caller drops it. - Better error visibility — fatal errors can now carry a backtrace, and you can inspect the active handlers with
get_error_handler()andget_exception_handler(). - Persistent cURL share handles — reuse connections and DNS across requests for less overhead.
Try it in seconds
Paste this into the playground with 8.5 selected:
<?php
$names = [' ada ', 'GRACE', 'linus '];
$clean = array_map(fn($n) => $n |> trim(...) |> ucfirst(...), $names);
echo array_first($clean), ' … ', array_last($clean), PHP_EOL;
Compare 8.5 with older releases
The real value of running PHP in the browser is testing across versions. Select 8.5 alongside 8.4 or 8.3 and run the same snippet on each — php.onl executes them in parallel and flags where the output differs. That is the quickest way to confirm new 8.5 syntax fails gracefully (or errors) on the version your project actually targets. See the full lineup on the versions page.
Why run PHP 8.5 here
- Private — your code never leaves your device; it runs locally via WebAssembly.
- Offline — once loaded, the 8.5 runtime is cached and keeps working with no connection.
- No signup — open the page and run code immediately.