Tested tool guide
Tested browser tools
Checked August 16, 2026
What PHP Playground (WASM) does, with a checked example
Server-side code in a serverless page: the PHP engine itself is compiled to WebAssembly and runs inside your browser. Your script executes locally, echo and print land in an output area, while warnings, fatal errors and parse errors appear in a separate error area. Paste a complete script that starts with the <?php tag and run it. The usual surprise: this is PHP's command-line interpreter, not a web server, so $_GET and $_POST are empty, header() does nothing useful, and files written to disk vanish on reload.
Worked example
A concrete input and expected output from the current implementation.
Input
<?php
$total = 0;
for ($i = 1; $i <= 5; $i++) {
$total += $i * $i;
}
echo "Sum of squares 1..5 = $total"; ->
Expected output
Sum of squares 1..5 = 55
The loop adds 1^2 + 2^2 + 3^2 + 4^2 + 5^2 = 1 + 4 + 9 + 16 + 25 = 55, and echo prints the interpolated string exactly as written into the output area. Small enough to verify by hand, and it exercises the full path: script, loop, string interpolation, stdout capture.