What is cool about PHP programming?

13 points by iofur ↗ HN
We all know about PHP Sadness, fractal of bad design, etc. but what is good about PHP nowadays? No sarcasm please.

15 comments

[ 2.7 ms ] story [ 48.7 ms ] thread
You can get stuff done, asap. There are a lot of higher level rails inspired frameworks like laravel or cakephp which let you get going quickly on any no name hosting site (all the UNIX ones support php). These tend to have drop in plugins with lots of functionality. Testing is supported.
At the "low" level, if you need to get some quick and dirty database queries up onto the web, PHP is probably the best way to do it. Big and bloated PHP web apps are the worst, but if you are looking for a way to add and remove a few entries here and there, then it is a good solution for a targeted problem.
As mentioned before if you want a quick way to some minor things with you site like displaying a simple visitor counter, PHP was made for it. But quick also often means dirty. There are frameworks now that will counter the dirtiness though.

As for what is actually "cool" about PHP, I would say nothing, however, I have to admit it is easy to find people willing to work with PHP. So PHP is maybe "cool" like 'Friday' was cool with so many people, I don't know, never been part of the "cool" crowd.

PHP makes it very easy to run web pages that need some server backend. Back in the days, everyone was using it.

Same with Ruby, was fun when there was a lot of people using the language/tooling but nowadays the action is moving to other languages that are "cool" (go, rust, haskell, ...)

As others commented here, PHP becomes a serious bottleneck as a project becomes more complex. In fact, to deal with complexity you will see PHP tackling the problems in a manner very similar to Java, but without being Java. So in the end you'd likely be better off with Java to begin with.

PHP very fast compare to the other languages like .net or java etc..
PHP coding is easy to understand literate human.
pays the bills. there's a lot of demand for good PHP developers - but there's a lot of bad fish in the pond.
Stateless, request-lifetime model works well for web, big library of packages, huge hosting market, simple to pick up. At the end of the day it's a language and like English it has it's faults (i before e, array before key) but you know you can go to any server and speak it and get something done.
It quickly enables first time programmers to experience that amazing feeling of omnipotency that comes when creating something.
You can read and write .xls files with it.
For me, the ability to get from zero to a business-worthy MVP in a matter of hours if you know what you're doing.
It supports procedural, functional, and object-oriented programming. You could even mix-and-match styles if needed.

Sure, it might not do them all 100% perfectly, but it does them well enough to get things done.