As developers, we have a bunch of stupendous stories about the time spent debugging legacy code. This blog is designed to highlight some of the most annoying / interesting / hair-rising / hilarious solutions of the past.
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).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment