How to rewrite it shorter?

return ($hasMoney && !$hasTime) || (!$hasMoney && $hasTime) || ($hasMoney && $hasTime);
April 7th 20 at 11:58
3 answers
April 7th 20 at 12:00
Solution
!(!$hasMoney && !$hasTime)
upd
= $hasMoney || $hasTime
cool)) - Casimir94 commented on April 7th 20 at 12:12
The law of negation of negation is not learned, Denis? - Jerrell38 commented on April 7th 20 at 12:03
@helene.Kovacek, that would be right now to answer to you \_(ツ)_/ - Ewell_Nad commented on April 7th 20 at 12:06
@Serenity, ex. - Jerrell38 commented on April 7th 20 at 12:09
April 7th 20 at 12:02
$hasMoney || $hasTime
April 7th 20 at 12:04
$hasMoney . $hasTime ? do smth : else

Find more questions by tags PHP