How can the lack of function overloading in PHP affect type checking and handling of parameters?

Without function overloading in PHP, it can be challenging to handle different parameter types efficiently. This can lead to code duplication or the need to use conditional statements to check parameter types, which can make the code less readable and harder to maintain. One way to address this issue is by using type hinting in PHP to enforce parameter types, ensuring that the correct types are passed to functions.

function add(int $num1, int $num2) {
    return $num1 + $num2;
}

echo add(5, 10); // Output: 15