Live · 7 languages

Write real code.
We actually run it.

No AI eyeballing your code and guessing. Every submission below runs for real, in a sandbox, against the exact test cases Phantom Learn uses — try it right now, no signup.

exercise · sumTable

Write sumTable(tbl) so it returns the sum of every number in tbl.

in  {1, 2, 3}
out 6

Tested against 4 fixed cases plus 3 freshly randomized ones — generated new, every run.

Results appear here once you run your code.

Why it's built this way

Nothing here is theater.

Grading by vibes doesn't teach you anything. Every one of these is a real, load-bearing part of how Phantom Learn decides if your code actually works.

Actually sandboxed

Your code runs with hard memory, CPU, and process caps. An infinite loop or a memory bomb gets killed cleanly and just fails that case — it can't take anything else down with it.

Randomized, every run

Test inputs aren't fixed. A fresh set generates each time you submit, so copying a known-good answer for one input doesn't help you pass the next.

Pass means pass

Output is checked against the real expected value, case by case. Not "looks about right" — matches, or it doesn't.

Roadmap

Seven languages live. More is coming.

Live
Lua, JavaScript, Python, PHP, Ruby, Perl & Groovy
Same real-execution grading across all seven — pick one above and try it.
Work in progress
More exercises
Beyond the first one — a real progression, not a single demo.