PHP / Intermediate: objects, persistence, and tests
PHP β Intermediate: objects, persistence, and tests
Connect object interfaces, loading, failures, PDO, sessions, and deterministic tests.
What you will learn
- Own dependencies, failures, transactions, and session state.
- Verify results and prohibited side effects in isolation.
Objects, interfaces, and domain invariants
Use classes to protect valid state and interfaces to express substitutable behavior. Separate object identity, readonly properties, and deep immutability through small pricing models.
Start learningNamespaces, autoloading, and Composer contracts
Separate class names from file loading and dependency resolution. Understand a PSR-4 mapping and reproducible dependency intent without installing packages or bootstrapping an application.
Start learningExceptions, warnings, and failure ownership
Define which layer detects, classifies, recovers, and presents a failure. Preserve causes without swallowing programmer defects or mixing diagnostics into the response body.
Start learningPDO, prepared SQL, and transactions
Bind data separately from SQL structure and verify durable invariants. All database demonstrations create their own in-memory SQLite database and never read configured application connections.
Start learningSessions, cookies, and state ownership
Understand a session as a server-side lifecycle associated with a client identifier. Separate authentication, authorization, cookie delivery, locking, and isolated session-storage evidence.
Start learningTesting PHP contracts with isolated evidence
Build deterministic checks for values, errors, output, and state. Learn what a tiny CLI harness can prove and where HTTP, database, or application integration evidence remains necessary.
Start learning