How PHP works?
The PHP programmer communicates with the website server, which transmits web pages to the rest of the globe. You are instructing the web server in the URL to send an HTML file if you input a URL in your web browser’s address bar. The requested file is sent by the web server. Your browser reads the HTML file and displays the site. You also request a file from the web server when you press a source on a webpage. In addition, when you click a web page button that submits a form, a file is processed by the web server. The method is precisely the same when PHP is mounted. You are submitting a file and, because of PHP, the web server that runs PHP answers with HTML. Through these steps you can stand:-
Step-1:- Client send a page request to the web server.
![](https://www.devopsschool.com/blog/wp-content/uploads/2021/05/How-PHP-works-Step-1-1024x498.jpg)
Step 2 – Web server forwards that request to the PHP interpreter.
![](https://www.devopsschool.com/blog/wp-content/uploads/2021/05/How-PHP-works-Step-2-1024x460.jpg)
Step 3 – Now PHP interpreter will take the Date from Database and response it back to the Web server.
![](https://www.devopsschool.com/blog/wp-content/uploads/2021/05/How-PHP-works-Step-3-1024x472.jpg)
Step 4 – At last Web server response to the client who has asked for the page request.
![](https://www.devopsschool.com/blog/wp-content/uploads/2021/05/How-PHP-works-Step-4-1024x489.jpg)