# 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