PHP / Basic: values and request foundations
PHP β Basic: values and request foundations
Build clear value, text, array, function, input, and response contracts.
What you will learn
- Validate data before domain use and render per context.
- Separate CLI examples from real HTTP evidence.
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 learningStrings, 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 learningArrays, 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 learningFunctions, 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 learningHTTP 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 learningEscaping, 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