Which version does this writing method apply to?
jesse2018-09-06 12:58:00
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.