What are the potential pitfalls of passing parameters in PHP functions?

One potential pitfall of passing parameters in PHP functions is the risk of passing the wrong type of data, which can lead to unexpected errors or behavior. To mitigate this risk, it's important to validate the input data before using it within the function. This can be done by checking the data type or using type hinting in the function signature.

function exampleFunction(int $param1, string $param2) {
    // Function logic goes here
}

// Example usage of the function
exampleFunction(10, "hello");