Before version 5, the constructor did not have an independent name. The function whose method name was the class name was the constructor of the current class. After version 5, __construct was introduced as the constructor of the class, and the same applies to version 7.
Before version 5, the constructor did not have an independent name. The function whose method name was the class name was the constructor of the current class. After version 5, __construct was introduced as the constructor of the class, and the same applies to version 7.