I remember when PHP was becoming popular. It allowed for inroads to code from front end designers who hated coding in Flash at a time when academia-based Java people were running all the big websites. If you wanted to hack up and put up a website, you can do so in a few minutes with a LAMP stack where a Java stack needed some lessons in Java.
Same is pretty much true today, but it's 10 languages instead of Java.
You know, Java was the same way. It was originally made in the 90s as a language made for embedded devices (toasters, refrigerators, etc). No one expected it to be a web language.
But Java offered something that was attractive to C++ coders: garbage collection. that made learning the language a lot easier. C++ people joked about Java never becoming popular. It crashed a lot! (core dumps - a common issue in PHP)
PHP reminds me a lot of what Java was 10 years ago. It's not as well put together as Java was. And it too took about 8-10 years to introduce templating.
My point:
1) PHP is popular because it has a more welcoming barrier of entry into coding.
2) PHP's problems appear the same to me as Java's problems 10 years ago.
That's all. Not saying one is better than another. Use whatever the fuck you want. I use both so as long as my employer pays me. Tell me to code mindfuck and I will. As I get older, I think I hate them all.
It was incredibly easy to setup both in production and for development - hence the LAMP stack and the thousands of cheap shared hosts that had PHP enabled, which lead to a lot of pre-install applications being written in PHP.
Other web applications only recently became easy to install, and they didn't beat 'ftp into the site and drag files over' until cloud platforms and virtualization.
The only thing that's getting better is that things like Heroku now exist. Heroku makes it insanely easy to deploy Python, compared to deploying on your own server. It's still harder to do than FTP + copy files, which most people know how to do.
Ummm.... I've been working with PHP for 16 years, and I could count the number of coredumps I've had in production on one hand (maybe 2). Early on, when compiling extensions by hand, I'd get some when I compiled something wrong, but that was always in test areas on dev machines.
If 'core dumps' were 'a common issue', I doubt it would be as widely used as it is now.
We were typically getting up to 200 req/second on our stack. So it was pretty heavy traffic to begin with. We solved the core dumps though. And the java core dumps were for the same reason (necessary to connect to JNI).
And yeah, connecting to C libs is commonplace in large PHP places. In fact, that's how PHP gets a lot of it's work done to be quick. Your ".01%" is a number you're throwing out of your ass and you know it.
I'm not surveying PHP usage, merely telling my experience. If you work on a website and need to connect to an external system that only has a C lib, guess what? You're going to connect using C libs.
I believe you referred to brainfuck, just for the record.
> As I get older, I think I hate them all.
There is some deep pessimism in the software world that I feel constructive.
When engineers talk about how much they hate the tools even they don't have to use, I think it shows the care they have toward the profession.
I'm saying as long as I get paid I'll do the job because I'm an hourly coder (pays more, have mouths to feed). I do plenty of "fun" work and open source work.
Just kidding dude. I was just joking when I said that. I love coding. I'd fuck a node.js program and even let XML lick my balls at the same time.
PHP works. A priori arguments from faults in the language don't explain its success. Replaying that old record doesn't add anything to What We Already Know.
Also: I didn't say that Javascript is different - I'm talking about the curmudgeons in comp.lang.js who argue that the practical benefits of using a JS library are outweighed by their flaws. This is clearly dis-proven by their popularity and demonstrable economic benefit. As for PHP, this remains true.