Various web template systems, web content management systems, and web frameworks exist which can be employed to orchestrate or facilitate the generation of that response. Additionally, PHP can be used for many programming tasks outside the web context, such as standalone graphical applications and robotic drone control.
Instead of building your own system for creating web pages, storing images, and other functions, the content management system handles all that basic infrastructure stuff for you so that you can focus on more forward facing parts of your website.
Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on screen, in print, by voice (via speech based browser or screen reader), and on Braille based tactile devices. CSS also has rules for alternate formatting if the content is accessed on a mobile device.
PHP code is usually processed on a web server by a PHP interpreter implemented as a module, a daemon or as a Common Gateway Interface (CGI) executable. On a web server, the result of the interpreted and executed PHP code – which may be any type of data, such as generated HTML or binary image data – would form the whole or part of an HTTP response.