What are the best practices for designing functions that accept a variable number of arguments in PHP?

When designing functions that accept a variable number of arguments in PHP, it is recommended to use the `func_get_args()` function to retrieve all passed arguments as an array within the function. This allows for flexibility in the number of arguments passed to the function without explicitly defining each parameter. Additionally, using `func_num_args()` can help determine the number of arguments passed to the function for validation purposes.

function sum() {
    $args = func_get_args();
    $total = 0;
    
    foreach($args as $arg) {
        $total += $arg;
    }
    
    return $total;
}

echo sum(1, 2, 3, 4); // Output: 10