Today I Learned

Some of the things I've learned every day since Oct 10, 2016

132: PHP is Ugly

So I learned the basics of PHP today. My main takeaway was that it is a very, very ugly language.

I don’t really know what else there is to say about it. But I will try to illustrate.

Instead of

\texttt{for (item in iterable)}

it’s

\texttt{foreach (iterable as item)}. A deliberate effort to make human readability less intuitive, I guess?

You have to start variable names with \$ ??? Why.

\texttt{strlen()}\texttt{strpos()}\texttt{strtolower()}\texttt{strtoupper()}? Really?

Also, using \texttt{.} for concatenation just so you can’t use standard dot notation.

How was all this syntax actually intentionally designed this way?

I just

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: