Output appears here after Run. Use echo or print_r() in PHP.
ReadyReady. Press Run. Runtime loads only when needed.
How to use this PHP compiler
Edit main.php and press Run. The Console shows echo and print output. greeting.php demonstrates a real include. Add files with +; use Options → Entry file to run another file. Preview renders HTML; API / response is optional for request data.
Code runs on your device in an isolated WebAssembly worker. Network is blocked. 10-second execution limit. First use downloads the runtime; subsequent runs in this tab reuse it. Save local stores the project on this device; Export downloads all files.
PHP online compiler
About this PHP compiler
Run real PHP 8.3 in your browser. Edit main.php, press Run and read the output, errors and line numbers straight away. Nothing is installed and your code runs on your device in an isolated WebAssembly worker, not on a server.
What you can try
- Test echo, print_r, arrays, string and date functions
- Split code across files and try include and require
- Send GET or POST requests with a JSON body and inspect status and headers
- Practise syntax and runtime errors with source line positions
PHP exercises and challenges · Coding practice · All online compilers
Frequently asked questions
Which PHP version does this compiler use?
It runs PHP 8.3 compiled to WebAssembly, so behaviour matches a standard PHP 8.3 CLI for ordinary scripts.
Can I use Composer packages or a database?
No. The compiler has no network access, no Composer and no database connection. Use the Laravel compiler for a bundled framework, or a local PHP install for custom packages.
Is there an execution limit?
Yes, 10 seconds per run, and projects are limited to 100,000 characters. Infinite loops are stopped automatically.
Is my code uploaded?
No. Code runs locally in your browser. You can save a draft on this device or export the project as a ZIP.