PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days.
For those of us who aren't afraid of a little ops work, there are far better options, and I say that as developer that's been using PHP regularly for going on 13 years.
"PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days."
And that's exactly why PHP is the better choice for those of us who distribute software to non-technical users.
The end user counts here, big time. A lot of the products out there would have precisely zero traction if they required literally hours of piddling around.
If you compare it to JVM based commercial offerings, and I'll pick Crucible as an example here, it requires:
1. Find a working JVM that matches it.
2. Piddle around with PATH settings and JAVA_HOMEW.
3. Unzip it.
4. Lots of database configuration.
5. Frig around with ACLs.on disk so it can actually write to its home directory.
6. Frigging around getting it to run as a service using a JVM service wrapper or init script that you have to write yourself.
7. Extensive backup/restore scripting.
8. Hours of dredging through Atlassian's shitty web site.
9. Fuck around with Tomcat to persuade it to work behind a proxy.
10. Set up an IIS ARR or apache AJP/HTTP proxy in front so you can serve it on a decent URL or port.
This applies to anything with stateful that requires any intevention other than copying files. That includes Python, Ruby, .Net (which is less painful I will say), Java, Scala, Clojure, common LISP. You name it.
The only things that it doesn't occur on are: ASP, PHP.
Most stuff in PHP is:
1. Unzip.
2. SFTP it up
3. Change the connection info in config.php
4. Run install.php and follow instructions.
5. Done.
People don't care about nginx vs fastcgi vs apache vs this vs that. They just want it to work and PHP gives a viable and simple solution to that.
The funny thing is that if you do care about nginx and fastcgi you can get blazing fast high-volume/low-overhead php hosting with varnish + nginx + php_fpm.
Right, most people who decide to use PHP aren't overly concerned about performance. And the folks who are concerned about it tend to choose other solutions (say, node.js, for example). The funny part is that it's fairly easy to take even bloated PHP apps like wordpress and turn them into high performance sites on very modest hardware.
But it still doesn't make PHP a good programming language.
I am doomed to fix legacy PHP projects for the rest of my life, because they are so badly written they simply cannot be upgraded to newer versions of PHP.
Yes it's popular and I've even seen designer jobs asking for php knowledge (lol), but that just tells us why it's so hated!
The new PHP might be great, but all those numbers the article has don't tell us how many of those are using newer versions of PHP. I bet 80-90% of everything written in PHP is STILL <= 5.2
Why is PHP so big? anyone can use it. Why is it so bad? When people actually learn how to program, it simply lacks everything.
I have been stuck with PHP for 4 years now and if at any point my boss lets me fix these projects, I'd run away from PHP as fast as possible...
How many webapps are installed by non-technical users? I guess for scripts (Wordpress, phpbb, etc.), PHP is the best option for this reason, as they have thousands of installations, but most webapps only have a few.
For those of us who aren't afraid of a little ops work, there are far better options, and I say that as developer that's been using PHP regularly for going on 13 years.