Earlier quoted context omitted.
It's hard for newbies who want to master the language. It's not hard for people who have no interest in learning a programming language and just wan't to make the thingy in their HTML do some stuff. Register globals, and be done. We have to remember the PHP origins and audience from way back to understand why this was considered easy to use.
That's actually interesting. It's not obvious to me that "2" should be parsed as an int and not a string. Perhaps we should either be explicit about what we want "2" to be parsed as (int, long, float, double, bigint, bigfloat, string...) or let the parsing of a number be determined in a more dynamic way. If you're comparing a string with an integer literal, then you probably want the string interpretation of the lite…
¹no DB, but the "just write your visitor counter into a plain text file" back then