The Boolean paradox
A small comparison just cost me half an hour of valueable time.
In an ongoing series, I shall present another PHP WTF: **The Boolean paradox**.
Rants on code, security, randomness and games
A small comparison just cost me half an hour of valueable time.
In an ongoing series, I shall present another PHP WTF: **The Boolean paradox**.
While idly browsing [pastebin][1] (yes, sometimes I do that), I found [something interesting][2]. It’s some mildly obfuscated PHP scripted malware. Curious what it might do, I started reverse engineering it and found what must be the *worst coded trojan **ever.***
[1]: http://pastebin.com/
[2]: http://pastebin.com/7HU17uqA
As of version 5.3 of PHP, certain features and functions are [considered deprecated][1]. It comes with the territory. In major version changes, new features are added while old stuff is discarded. Unsurprisingly – and lucky for me, with that change in versions comes yet another WTF for me to rant about.
[1]: http://www.php.net/manual/en/migration53.deprecated.php
As the first entry to the list of my PHP-related WTFs, I present:
**The whitespace of death**
This one has taken me almost a **full hour** to sort out. There may be some good features to PHP, yet this one I don’t think is even one. It should be considered a bug. As my experience has grown in [reporting bugs myself][php-bug1] or trying to [report a bug][php-bug2], I reconsidered and chose not to report it as a “bug”.
[php-bug1]: https://bugs.php.net/bug.php?id=48458
[php-bug2]: https://bugs.php.net/bug.php?id=51112