PHP / Basic: values and request foundations

PHP β€” Basic: values and request foundations

Build clear value, text, array, function, input, and response contracts.

6 lessons Β· No account required

What you will learn

  • Validate data before domain use and render per context.
  • Separate CLI examples from real HTTP evidence.
  1. PHP execution, values, and the runtime boundary

    Understand how a PHP program runs before connecting it to a web request. Use a PHP 8.3 syntax baseline and distinguish the validated PHP 8.5 CLI host from a web server process.

    Start learning
  2. Strings, text boundaries, and encoding

    Treat PHP strings as byte sequences while giving human text an explicit encoding policy. Diagnose length, search, concatenation, and serialized output without assuming every byte is a visible character.

    Start learning
  3. Arrays, control flow, and explicit absence

    Use PHP arrays as ordered maps and distinguish record fields from lists. Combine strict decisions and bounded iteration without hiding missing keys or changing list shape accidentally.

    Start learning
  4. Functions, scope, and closure capture

    Write calculations with explicit parameters and results, then trace captured state. Distinguish ordinary functions, arrow functions, by-value captures, and deliberate references.

    Start learning
  5. HTTP input, forms, and validation boundaries

    Interpret request data without assuming superglobals are trusted records. Separate method checks, input shape, domain validation, and error feedback using synthetic submissions.

    Start learning
  6. Escaping, headers, and response construction

    Keep domain data separate from HTML and JSON representations. Build response decisions before output, and understand why an early byte can prevent later header changes.

    Start learning
Back to course