What's the best practice for writing if-statement on boolean value?
function foo(boolean $bar)
{
if ($bar === false) // ...
// or
if (!$bar) // ...
}
With a Not operator it's more compact, but you may not notice this operator while reading a code.
And why do some coders write in Yoda style like false === $bar
?