How EMBARRASSING!

I just found some code I wrote…

$result = ($a == $b) ? true : false;

Or, in non-ternary notation:

if ($a == $b)
result = true;
else
result = false;

Or, in english … evaluate $a == $b and if the result is true, return true, otherwise return false.

I should have just written: $result = $a == $b.

*embarrassed*

1 Comment

Avatar
LoopyNZDecember 13th, 2005 at 5:11 pm

You lie! You must have got that straight from Computer Stupidities!

Leave a comment

Your comment