In the given PHP script, what are the common mistakes made in defining and calling the zinsen function?

The common mistakes in defining and calling the zinsen function include not passing the required parameters when calling the function and not returning a value from the function. To solve this issue, ensure that the function is defined with the correct parameters and that it returns a value.

// Incorrect definition and calling of the zinsen function
function zinsen() {
    $kapital = 1000;
    $zinssatz = 0.05;
    $jahre = 2;
    $zinsen = $kapital * $zinssatz * $jahre;
}

// Corrected definition and calling of the zinsen function
function zinsen($kapital, $zinssatz, $jahre) {
    return $kapital * $zinssatz * $jahre;
}

// Calling the function with parameters and storing the result in a variable
$zinsen = zinsen(1000, 0.05, 2);
echo "Zinsen: " . $zinsen;