Introduction to PHP

How this course works, what the workbench can do, and the chapter list.

This is a PHP course for the Swiftener PHP Playground (php-wasm). Every script starts with <?php. Always echo and end lines with PHP_EOL. Python belongs in Introduction to Python.

Goal

Finish every chapter by running the copy-paste blocks. The last chapter is a Nairobi receipt you can reuse.

How to take the course

  1. Keep this tutorial tab and the PHP Playground side by side.
  2. Wait until PHP is ready.
  3. Copy an exercise, paste it as the whole editor, then press Ctrl+Enter (or Cmd+Enter).
  4. Every fence starts with <?php. Always echo a result plus PHP_EOL.

What this playground can and cannot do

  • Can: PHP, echo, arrays, classes, local drafts, a kiosk text file.
  • Cannot: a web server, $_GET from a real URL, or installing extensions.

Sample files

  • kiosk.txt — Nairobi kiosk lines

Chapter list