$e]); } return null; } } function attempt_if($condition, callable $callback, bool $log = true): mixed { return value($condition) ? attempt($callback, $log) : null; } function attempt_unless($condition, callable $callback, bool $log = true): mixed { return !value($condition) ? attempt($callback, $log) : null; }