I have a doubt with a few lines of PHP.
I have the following code:
// returns TRUE if a day is festive, FALSE otherwise
$festive = isFestive();
//
$workingDay = $d>0 && !$festive;
Is $workingDay = $d>0 && !$festive the same as writing $workingDay = $d>0 && $festive==FALSE; ?
Any help is appreciated.
Yes, it is.
It is different if you instead do:
$festive === FALSEsince in that case, values of$festivethat are “falsy” will not return true, since they not exactly FALSE.