What are the potential pitfalls of passing empty values to a function in PHP?

Passing empty values to a function in PHP can lead to unexpected behavior or errors, especially if the function expects non-empty values. To solve this issue, you can check for empty values within the function and handle them accordingly, such as providing default values or returning an error message.

function exampleFunction($value) {
    if(empty($value)) {
        return "Value cannot be empty";
    }
    
    // Rest of the function logic here
}