PHP is still more widely deployed for small/medium websites than any other language. WordPress still powers more websites than any other single application, for example.
Facebook was always an anomaly in supporting/using PHP at that scale. PHP was never a major player in very large companies...until facebook. I think this is a return to the mean, rather than a seismic shift in a new direction.
That's not to say PHP isn't fading...it is. But, I don't think this is a huge hit to PHP.
And, YouPorn (I think? I get all the porn tubes mixed up) was using Perl (at least they were a decade ago when I met some of the devs), though now that many of the big porn tubes are owned by the same entity, I would guess they've consolidated down to one platform.
But, sure, if you go to a PHP conference or web dev conference you could meet PHP devs working in almost any industry. It's interesting how insular some dev communities are that one could get the impression that PHP is just...like...gone. As much as we may turn our nose up at it as a language, as a platform it's been a huge success, especially for small developers and web designers that do a little development.
A gazillion lines of code running on a few million servers has an inertia that takes more than a few years of stagnation to kill, even if newer languages get a lot more hype. There's still plenty of Perl in the wild, including in some pretty mission critical deployments, and Perl was declared dead 15 years ago (with PHP being the alleged killer).
Likewise, millions of people still work in Java, C, C++, Ruby, and many others, despite there being newer languages with more momentum behind them. PHP will be around for years, even if there were never a new PHP project started from this day forward (but there will be new PHP projects started after today). So, sure, it's dying, but it's not dead yet and likely won't be for decades.
Your impression is completely different from the reality.
Facebook was/is irrelevant to PHP adoption. Their only effect was to increase the speed of PHP.
PHP is widely used because it's really great language for web development. It's better than the other choices because of ease and rapidity of development, and because it was designed for the web, not as a regular language with web things bolted on (Python and JAVA are examples of that).
It is not fading at all. Some developers think it's too easy of a language, so they discount it as for beginners only. That's about it. It's a kind of snobbery, which I'm glad to see seems to be vanishing with the release of PHP7.
"Some developers think it's too easy of a language"
Good lord, who thinks that? PHP is a terrifyingly complex and difficult language. I'm not saying it's bad, it's been very successful for its intended purpose. But, it is definitely not an easy language.
It's got thousands of standard functions in the global name space (admittedly, it has been recognized that this was a mistake, but it's all still in there), quite a lot of syntax, and some weird syntax that's unlike any other language, a high level of verbosity in many places (due, in part, to that whole thousands of functions in the global namespace thing, but also due to an apparent admiration for Java during a critical period in PHP development), a variety of quirks and inconsistencies, etc. PHP is a very big, very complex, language, that takes years to master. I can't see how it can be called "easy". Many other languages are much better teaching/learning languages. PHP is popular and widely discussed, which helps with learning it. PHP is also very easy to deploy, because it is the "standard" web language...you just upload your files to the right directory on most hosting platforms and you're done. That's great, but doesn't really make the language easy.
> It's got thousands of standard functions in the global name space
There is exactly 0 difference between prefixing a function, and putting it in a different namespace. All those functions have prefixes and are very easy to locate and understand.
It's literally the difference between \foo\bar and foo_bar. It makes no difference for understanding the function.
The only advantage of a formal namespace is you can "own" it, and other code can't put things in there. Not having it does not making the core language harder to understand.
> quite a lot of syntax
It's basically the syntax of C. The most complicated parts are lambda functions and references. And that's nothing. Where are you getting "quite a lot of syntax" from?
Classes have a bit of syntax, but it's hardly "quite a lot", and the nice this is you don't have to learn any of it to get started.
> a high level of verbosity in many places
Where? PHP is not especially verbose. Examples?
> a variety of quirks and inconsistencies, etc.
There's basically just two: Comparing an empty string and the mistake with precedence on the ternary operator. Everything else confusing is the difference between arrays and Key/Value structures, and it's not really not that hard to figure out.
> PHP is a very big, very complex, language, that takes years to master.
It is not very big. The core language can be learned in a week. It's not very complex either - it's among the easiest languages out there.
> Many other languages are much better teaching/learning languages.
Not because they are easier - because they are harder!! They are more structured and you have to understand more - that makes them good to teach concepts. PHP was never intended as a teaching language.
"Not because they are easier - because they are harder!!"
That doesn't make sense.
I think we'll just have to agree to disagree. I believe there are many languages, including some often used for web development, that are easier (and better teaching/learning languages) than PHP in several regards. Python is the most obvious but Ruby also fits the bill.
In what way is it "not supported by cloud providers"?
Google App Engine: has PHP runtimes
Heroku: supports PHP
Azure App Service: supports PHP. Experimental support in Azure Functions available.
AWS: I think the only language-specific thing they have is Lambda, which doesn't directly support PHP, but it can be run on it with workarounds if you really want to.
Everything exposing VMs or containers of course can run it. API client libraries/SDKs are widely available. FaaS support is limited.
If PHP was only useful for juggernauts like Facebook, Wikipedia, Wordpress, Magento, Tumblr, Slack, Dailymotion and Etsy, PHP would be a very obscure language. I think it's alive because it can be (and is) used by everyone.
Weren't they THE big player that kept PHP alive in the last years?