Backend development

Stage 1 · Lesson 6 of 10

How PHP runs a request

Your language and how HTTP works

Classic PHP shares nothing between requests. The web server hands each request to , a pool of PHP worker processes. A worker runs your script from the top, sends the response and throws away everything it created.

Nothing survives to the next request unless you store it in a database, or session. This keeps PHP simple and robust, since one bad request cannot damage another. OPcache keeps the compiled code in memory, so PHP does not re-read your files every time.

starts up fresh on each request for the same reason. Long-running servers such as Laravel Octane change this model.

Common trapa static property used as a cache: it lasts one request under FPM, but leaks between requests under Octane.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • VideoFree
    PHP For Beginners

    Laracasts · Beginner

    Free video series that builds a small app in plain PHP before any framework

  • GuideFree
    PHP: The Right Way

    Josh Lockhart and contributors · Intermediate

    Modern PHP practice in one place: Composer, PSR standards, PDO and security basics

Practise

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Quick syntax lookups for your language when you forget how something is written

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?