Can you explain the PHP request-response cycle from the moment a user hits a URL to the point the HTML is rendered?

Last updated 15 June 2026

  • The browser resolves DNS, opens a TCP/TLS connection and sends an HTTP request. Nginx/Apache serves static assets directly or forwards dynamic requests to PHP (via PHP-FPM/FastCGI).

  • A front controller (e.g. index.php) bootstraps, routes, runs controller logic and database queries, then renders HTML returned with headers and a status code.

  • The server relays the response, and the browser parses the HTML, fetches CSS/JS/images as extra requests, builds the DOM and paints.

  • https://intellipaat.com/blog/interview-question/php-interview-questions/
All PHP interview questions