Viliam_Bur comments on Open Thread, July 1-15, 2012 - Less Wrong

2 Post author: OpenThreadGuy 01 July 2012 10:45PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (150)

You are viewing a single comment's thread. Show more comments above.

Comment author: Viliam_Bur 05 July 2012 06:55:57PM *  1 point [-]

Is that the only function that starts with "html"?

There are two functions starting with html: "htmlentities" and "htmlspecialchars". They do almost the same thing.

Is "html" a common variable name?

Variables in PHP must start with $, so it could be only "$html". There is no possible conflict.

By the way, I think this language design choice is good... well, I would hate to see it in my favourite language, but for a typical PHP user it is probably good that something prevents possible conflicts between variables and other things (functions, keywords, class names).

Some things in PHP can be defended as "better for beginners", especially for people who actually never want to learn programming beyond using the google-copy-paste pattern. But some things are just pure stupidity, and those should be fixed. And I don't expect that the authors of PHP will ever fix them; they just seem to make more stupid choices in every new version.