What are the potential pitfalls of naming functions the same as the class in PHP?

Naming functions the same as the class in PHP can lead to confusion and make the code harder to read and maintain. To avoid this issue, it is recommended to use unique and descriptive names for functions that clearly indicate their purpose.

class MyClass {
    public function myFunction() {
        // code here
    }
}