How does the web server handle parsing of HTML and PHP files differently?

The web server handles parsing of HTML files as static content, simply serving the file as is to the client. However, PHP files require server-side processing to interpret and execute the PHP code before sending the resulting HTML to the client.

<?php
// This is a PHP file that will be parsed and executed by the server
echo "Hello, World!";
?>