We're a place where coders share, stay up-to-date and grow their careers.
Here is the simple solution with PHP:
function setAlarm(bool $employed, bool $vacation): bool { if ($employed === false && $vacation === true) { return false; } return boolval($employed ^ $vacation); }
Here is the simple solution with PHP: