In js, the function is capitalized as follows: {code ...} it can be called "Constructor". In a class, for example, (php) {code ...} __construct () is also called "constructor". What is the difference between the two types of construct () and construct? In js, the upper-case function is as follows:
Function Person (){//};
It can be called "Constructor ",
In a class, for example: (php)
Class Man extends Person {public function _ construct (){//}}
_ Construct ()
Also called "Constructor ",
What are the differences between the two types of Constructors?
Reply content:
In js, the upper-case function is as follows:
Function Person (){//};
It can be called "Constructor ",
In a class, for example: (php)
Class Man extends Person {public function _ construct (){//}}
_ Construct ()
Also called "Constructor ",
What are the differences between the two types of Constructors?
Syntax. php also supports class name functions as constructor methods, which are introduced by php5.3 with double underscores.