Bird
0
0

Why does PHP create a new process or thread for each web request instead of keeping one process alive?

hard📝 Conceptual Q10 of 15
PHP - Request Lifecycle
Why does PHP create a new process or thread for each web request instead of keeping one process alive?
ATo isolate requests and ensure a clean environment each time
BBecause PHP cannot run more than one request at a time
CTo save memory by reusing variables between requests
DBecause PHP scripts run continuously in the background
Step-by-Step Solution
Solution:
  1. Step 1: Understand PHP process isolation

    Creating a new process per request isolates execution and prevents data leaks between requests.
  2. Step 2: Benefits of fresh environment

    This ensures security and stability by starting with a clean state every time.
  3. Final Answer:

    To isolate requests and ensure a clean environment each time -> Option A
  4. Quick Check:

    PHP process model isolates requests [OK]
Quick Trick: New process per request keeps environment clean [OK]
Common Mistakes:
  • Thinking PHP can only handle one request at a time
  • Believing variables persist between requests
  • Assuming PHP scripts run continuously

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes