Introduction
PHP runs your code every time a user asks for a page. It starts fresh each time to keep things simple and safe.
When a website needs to show a new page for each visitor.
When you want to make sure each user gets a clean start without leftover data.
When handling form submissions where each request is separate.
When building simple web apps that don't keep running all the time.
When you want to avoid complex memory management between users.