Anything and Everything – The Daily WTF

Today’s short function comes from Janusz, and it’s anything you want it to be:

public static function isAnything($data)
{
    return true;
}

Honestly, I’m surprised that it was made static. Sure, static is the correct choice for this function, at least if we’re describing anything about this function as “correct”. I’m still surprised. It’s got an accurate name given its behavior, it’s scoped correctly. It still shouldn’t exist and I have no idea what lead to it existing, but that’s not surprising.

[Advertisement]
Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.

Source link

Stay in the Loop

Get the daily email from CryptoNews that makes reading the news actually enjoyable. Join our mailing list to stay in the loop to stay informed, for free.

Latest stories

You might also like...