Should a function always return a value or only in specific cases?

Functions in PHP should ideally always return a value to ensure consistency and predictability in the code. However, there may be cases where a function does not need to return a value, such as when it is solely responsible for performing side effects. In such cases, it is still good practice to have the function return a value, even if it is just a boolean indicating success or failure.

function addNumbers($a, $b) {
    return $a + $b;
}