Online compiler, debugger and visualizer

Online PHP compiler

Run PHP 8.4 scripts online from the command line: read input from STDIN, include other files of the project, and see parse errors and exceptions with the line they are on.

  • Free
  • No sign-up
  • Real compilers
  • Works on phones
main.php
<?php $words = explode(" ", trim(fgets(STDIN)));$counts = array_count_values($words);arsort($counts); foreach ($counts as $word => $count) {    echo "$word: $count";}

What you can do

  • Real PHP 8.4

    Your code is compiled and run by the real PHP toolchain on our servers, not a simulation, with the exact errors you would see on your own computer.

  • Input while it runs

    Programs that read input (Scanner, input(), scanf, cin) ask for it in the console as they run, just like a terminal. Or prepare the input in advance.

  • Test cases

    Add inputs with the expected output and run them all with one click. See which lines differ, like on a coding judge, for any code you write.

  • Errors explained

    Compiler and runtime errors link to the exact line, with a plain-English explanation of what went wrong and how to fix it.

  • AI help that sees your code

    Ask why a test fails or what an error means. The assistant sees your files and the real output, and can fix the right line for you.

  • Code together live

    Share a link and code with friends or students in real time: shared cursors, edits, runs and test results.

How it works

  1. 1

    Click "Open the PHP compiler". A project with a ready-to-run main.php opens.

  2. 2

    Write your code. Files save automatically in your browser as you type.

  3. 3

    Press Run (Ctrl+Enter). If the program reads input, type it in the console.

  4. 4

    Add test cases to check your program against expected outputs, or share a live link to code with someone.

Questions and answers

Which PHP version is used?

PHP 8.4, run as a command-line script.

Can I include other files?

Yes. Add more .php files to the project and use require or include.

Does it run a web server or a database?

No. The script runs once and prints its output, like `php main.php` in a terminal.

Is it free?

Yes. Running, debugging, tests and live sessions are free, with no sign-up.

Where are my projects saved?

In your browser, on your device, automatically as you type. Nothing is lost when you close the tab. They stay until you delete them.

Is my code safe to run?

Every program runs in its own isolated sandbox with no internet access and strict limits on time, memory and processes, and is deleted when it finishes.

Compilers and tools