What are the potential issues with overloading code in PHP, as seen in the example provided?

Overloading code in PHP can lead to confusion, maintenance issues, and decreased performance. To solve this problem, it's important to refactor the code by breaking it down into smaller, more manageable functions with clear responsibilities.

// Original code with overloading issue
class Calculator {
    public function add($a, $b) {
        return $a + $b;
    }
    
    public function add($a, $b, $c) {
        return $a + $b + $c;
    }
}

// Refactored code to avoid overloading
class Calculator {
    public function addTwoNumbers($a, $b) {
        return $a + $b;
    }
    
    public function addThreeNumbers($a, $b, $c) {
        return $a + $b + $c;
    }
}