Get the most from each lesson's server editor with a deliberate loop—the same habits that transfer to local PHP, Laravel Sail, or Docker setups.
Recommended workflow
- Read the concept section before editing code.
- Click Run to execute PHP on the dev runner.
- Use
echofor readable strings; useprint_r()orvar_dump()for arrays and types. - Change one idea at a time—a variable, a loop condition, one array key.
- Read parse errors carefully—they often point to a missing semicolon or unmatched brace.
- Reset the editor if you drift far from the lesson goal.
What the runner can and cannot do
- Can — run pure PHP: variables, functions, classes, file functions on allowed paths, JSON encode/decode
- Simulated —
$_GET/$_POSTsamples in comments or local arrays; session/cookie behavior explained in prose - Needs local setup — real MySQL/PostgreSQL via PDO, Apache/Nginx routing, sending HTTP headers to a browser
Review HTML forms if GET vs POST feels fuzzy—PHP reads what the browser sends.
Self-check
- When should you use
var_dumpinstead ofecho? - Why change one concept at a time while learning?
Challenge
First run
- Click Run with the default code.
- Confirm
PHP_VERSIONprints in the output. - Add a second
echowith your name.
Done when: the terminal shows the PHP version and your custom message.