Last night I updated to Ubuntu 16.04. Got PHP to work in localhost (running phpinfo there shows that php is working) by following the directions here. Before commenting out the lines in php7.0.conf, the php code would be returned as text in the browser, after commenting them out all that shows up is the title of the index.php file. The permissions of my public_html/ is drwxrwxr-x. It was working in Ubuntu 14.04.
I've read that I should delete all references to mods-available/php5... would that help?
I've also read that maybe I should add to the www-data group, would that help?
NEW INFO: my php was working (I had the edits to the conf file). My php info file looked like
<?php
phpinfo();
?>
but the info php script in www/var/html looks like
<?php phpinfo(); ?>
good grief. I'm going to have to figure out how to re-write php5 into php7. Any hints?