PHP used to get a bad rep, and I myself looked at it sorely, but PHP7 is indeed looking promising, and I have noticed a lot of the tutorials I've seen on the more major sites promote proper PHP development (from the little PHP I know). For $5 a year I could host a PHP website, can't effectively do that in other languages / platforms. I really hope PHP7 gets more recognition amongst most web hosts.
Economically speaking, it really is. App Engine will run those languages cheaper because it's subsidizing them.
PHP hosting is more naturally cheap which is why there are so many cheap PHP hosts out there. It basically boils down to one simple principle: boot up.
With other languages, you have to boot up. You've got to startup the app, load it into RAM and sit there waiting for a connection. With PHP, you can fill up a hard drive with code and it will all run when called as long as the request volume doesn't overload the RAM.
That's the entire reason that PHP hosting is so much cheaper. RAM doesn't get used until a request comes in.
This isn't technically accurate. Most PHP setups these days load php, keep it loaded, and listen to requests. What you describe is a process by which something like apache listens, and on EACH request, loads your php script, interprets it, and they let's the php process end. First, this is a LOT slower, which is fine if you get very very few requests, but you quickly grow out of that. Second, it's not something that is limited to php. This is how most perl site worked back in the day, and you can do the same thing with ruby and python.
Last, it really is super cheap to host php, python, ruby, perl, etc sites these days. My hobby site is hosted on app engine, and it pay $0 per month. It's been running for over a year, and gets a fair amount of traffic for a hobby site. Sure, it's subsidized, but I could run the same setup, with a bit more work on my part, on a VPS for $5/month. Yes, php hosting is historically cheaper, but these days that difference is hardly relevant.
Isn't the language much bigger than the size of the parsed code? Using PHP with FPM or with mod_php, you have that language runtime sitting there unused even if there are no requests. By your logic, CGI would be the cheapest.
It would be. With PHP the language is loaded once regardless of how much code is going to be parsed and executed. The amount loaded matches size of the code base with other languages that have to boot up, which puts a cap on how much low traffic code you can put on a single server.
You could say the same about PHP couldn't you? And with more options than just being locked in to Google. As has been said, it is relatively cheaper to host PHP than it would be other languages, after all, the primary design for PHP is the Web, other languages have more general needs by design.
Edit:
My hope is that one day that changes, because PHP shouldn't be and isn't the only language in town.