What are the potential pitfalls of mixing OOP and procedural approaches in PHP code?

Mixing OOP and procedural approaches in PHP code can lead to confusion, inconsistency, and decreased maintainability. It is best to choose one approach and stick with it throughout the codebase to ensure clarity and organization. If you must mix the two approaches, consider encapsulating procedural code within OOP classes to maintain a structured and cohesive codebase.

class ProceduralWrapper {
    public function doProceduralStuff() {
        // Procedural code goes here
    }
}

// Usage
$wrapper = new ProceduralWrapper();
$wrapper->doProceduralStuff();