There is a problem with the mime type for php files. If all you did was upgrade php then I'm wondering if a file or directory name got changed somewhere in the upgrade?
In my Apache/Windows setup in http.conf I have the following under the IfModule mime_module section
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
If I comment it out and restart Apache I get the actual php code showing which makes sense because the server doesn't know how to serve php files.
I tried making the path to my php-cgi.exe incorrect thinking it might cause the same issue but it actually gave me a internal server error instead of showing the php code so not very helpful.
But I would guess whether Apache or Nginx, Windows, Linux, or Mac, there should be a similar setting in the servers config files and either a incorrect version of PHP for your system or a change in the path could cause this.