PHP / Intermediate: objects, persistence, and tests

PHP β€” Intermediate: objects, persistence, and tests

Connect object interfaces, loading, failures, PDO, sessions, and deterministic tests.

6 lessons Β· No account required

What you will learn

  • Own dependencies, failures, transactions, and session state.
  • Verify results and prohibited side effects in isolation.
  1. 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 learning
  2. Namespaces, 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 learning
  3. Exceptions, 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 learning
  4. PDO, 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 learning
  5. Sessions, 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 learning
  6. Testing 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
Back to course