How does the web server configuration determine how PHP files with different extensions (.php4, .xyz) are parsed and executed?

The web server configuration determines how PHP files with different extensions are parsed and executed by mapping file extensions to the PHP interpreter. This mapping is typically done in the server's configuration file (e.g., httpd.conf for Apache) using directives like AddType or AddHandler. By specifying the appropriate handler for each file extension, the server knows how to process PHP files with those extensions. ```apache # Example configuration for Apache server AddType application/x-httpd-php .php .php4 .xyz ```