What are the potential pitfalls of using multiple inheritance in PHP classes?

Potential pitfalls of using multiple inheritance in PHP classes include the issue of diamond inheritance, where a class inherits from two classes that have a common ancestor. This can lead to ambiguity and conflicts in method resolution. To solve this issue, it is recommended to use interfaces for defining contracts and traits for code reuse, rather than relying on multiple inheritance.

interface A {
    public function methodA();
}

interface B {
    public function methodB();
}

trait C {
    public function methodC() {
        // implementation
    }
}

class MyClass implements A, B {
    use C;

    public function methodA() {
        // implementation
    }

    public function methodB() {
        // implementation
    }
}