i just saw the funniest thing in PHP yet! below is taken from here.
This code is lifted from a socket handling class that I’ve been asked to work on today. Prepare to cringe:
if (eregi('Invalid argument supplied for foreach() in /usr/cvs/projects/13xx/1371/Classes/XML/XML_inc.php on line 392',$v[0])) { return false; }
It’s worth noting that the foreach() statement will move from line 392 with so much as a return key (as it did today?). It’s also worth noting that the path information is gloriously hard-coded. This was deemed dailywtf worthy in the office, and as such I present it to you now.
Happy Wednesday 🙂