
PHP: a fractal of bad design (2012) - heinrich5991
http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
======
toni
I am sorry but this is one of those posts (from 2012, no less) that should be
killed by dang because it only instigates a black hole of useless discussions
and adds absolutely no value. Do yourself a favor, save your brain cells, do
whatever you think is productive and nice this weekend. Sometimes it's better
to just ignore trolls.

------
DoubleMalt
There is one major reason why PHP is so popular:

The step from HTML only to a slightly enhanced webpage with dynamic elements
is easier than with any other language (JS included).

Combine that with the simplicity of mod_apache (that is available on almost
every web host) and it is the easiest way into programming.

Create a mod_[ruby|python] that just evaluates ERB/Jinja templates and is as
simple to integrate into apache and you might be able to do something good.

------
aruggirello
It's strange that, given how badly designed PHP really is, it's so
surprisingly flexible that things like my PHP preprocessor can exist:
[https://news.ycombinator.com/item?id=7861616](https://news.ycombinator.com/item?id=7861616)

I'm _sure_ you could write a shorter, (maybe) faster, cleaner preprocessor for
Python, Java or Erlang, but I'm not sure it would be a viable solution, there.
With PHP, I got this 'mostly unused hash comments' thing readily available,
like a low-hanging fruit. And then, there was token_get_all() - the
squeezer...

------
joesmo
At least half of these things are either examples of _good_ design or neutral.
That said, there isn't a single language for which I wouldn't be able to
produce a laundry list of "bad design" that's equally as long and disturbing
as this one.

Insulting PHP developers and their work is certainly not the best way to
"hurt" people's "opinion of PHP." It's a great way to come off as a pompous
asshole, however.

------
tmikaeld
For someone new with PHP, this might be an eye-opener.

How long would the list of problems be for any other non-statically typed
language? Like for example, Javascript?

~~~
iamben
Someone new to something isn't usually looking for negatives - they just want
to find out how to get something done and go and solve a problem / make
something.

~~~
tmikaeld
True, but even new people read on hackernews.

At least it would prepare them for what is to come.

------
LukeB_UK
If you don't like PHP, you're in luck! There are many, many, many other
languages you can use.

Let other people make their own choices, no need to rant about a language you
dislike to try and convince them to not use it.

------
mathenk2
This is an out of date article that doesn't have much value any more -- many
of the points seem to be bad practices anyhow. Like most languages, if you
never learn it in depth, all you see are the warts. This same article could be
written for nearly every other language; how many "This Language Sucks, and
Here's Why" articles are going to keep popping up?! Please kill this.

------
h1fra
Can we stop these post, it was fun once but that start to be really boring.

PHP is badly conceived, we all know that, get over it !

------
Kudos
I couldn't get past the paragraph analogy. I'm sure they thought it was
clever, but actually it was unnecessary, inaccurate (as all analogies tend to
be) and portrays the person the article should be targeting as a dumbass.

------
hysan
Previous discussion:
[https://news.ycombinator.com/item?id=3820431](https://news.ycombinator.com/item?id=3820431)

------
Yaa101
Sigh, again another PHP is bad, please give me attention, rant...

Nobody is forcing people to use it.

~~~
Kudos
I doubt everyone who has to use PHP at work wants to be doing it, some of them
are forced to by their circumstances. How else do you think these sorts of
articles come to be?

------
RossM
Oh, it must be Summer again.

