Friday, April 4, 2014

PHP SPL is a mess

The standard PHP library is a mess. There's no system in function naming neither parameter order whatsoever. Two key things, which would be crucial for learning the language without having to memorize all kind of random sh*t. Even more confusing, if you - as me, few seconds ago - face an incredible composition of two functions, that seemingly produce different behaviour. They don't. They are just named this way, thanks to the great SPL. Yes, I've met html_entity_decode(htmlentities($content)) in a code that's meant to clean some ckeditor input text. Just as horrible, as it seems. The more anti-conventional PHP is, the more newbies will make these mistakes. I'm seriously waiting the moment when camels come, dollar signs disappear, and PHP turns to an object-oriented language, while it stays dynamically typed. Sweet dreams, huh? (until then, Ruby is almost the whole package).

No comments:

Post a Comment