I uploaded via ftp, then typed in the URL of the script to Safari; Safari downloaded the source!!
This hosting site has never done that before - .php scripts have always executed.
I can't duplicate it. The page loads as php should now.
Maybe I just caught them while some .htaccess setting was changing?
Maybe my debug line ini_set('display_errors','stdout'); allowed this?
There was a 'compilation failed' error on the page.
So now, I gotta change my sloppy ways and write php code like it is exposed to view.
What could possibly have caused this anomaly?
OK, what happened was, I had recently changed the .htaccess file to use a newer version of php. Fine. But I had also downloaded that .htaccess file to my local server. The web address for the local is similar to the site. So.. fumble-fingered, I didn't notice Safari had auto-filled the address with my local site. The local site was trying to run the script with the new version of php which it did not have, so it just delivered the script as a download. Not the best thing to do, I don't think, but at least it wasn't the live server.
So I have mutated the question to 'should I worry' about exposed php. After all, if my local server will deliver the script text under some conditions, might the live server, also?