Adding the following lines to the httpd.conf file fixes the problem:
AddType x-httpd-php .php AddHandler application/x-httpd-php .php .php5
Hope this helps!
Edit: just to provide a little more detailed information, as crmpicco suggests, I also replaced the new High Sierra httpd.conf and httpd-vhosts.conf files with my old Sierra ones, such as:
mv httpd-vhosts.conf~previous httpd-vhosts.conf mv httpd.conf~previous httpd.conf
Even after all this and restarting Apache, it still did not work - I had to restart everything in order to take effect.
source share