Stage 1 · Lesson 6 of 10
How PHP runs a request
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
- VideoFreePHP For Beginners
Laracasts · Beginner
Free video series that builds a small app in plain PHP before any framework
- GuideFreePHP: The Right Way
Josh Lockhart and contributors · Intermediate
Modern PHP practice in one place: Composer, PSR standards, PDO and security basics
Practise
Keep handy
Also worth your time
The DNS, TCP, TLS and HTTP steps behind every request your backend will handle