What are the potential compatibility issues between PHP4 and PHP5 constructors in the context of class naming?

Potential compatibility issues between PHP4 and PHP5 constructors arise when the class name and constructor name are not the same. In PHP4, the constructor method was named the same as the class, while in PHP5, the constructor method is always named "__construct". To ensure compatibility, you can create a constructor method named the same as the class and have it call the "__construct" method using the "parent::__construct()" syntax.

class MyClass {
    function MyClass() {
        parent::__construct();
    }

    function __construct() {
        // Constructor logic
    }
}