84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在js中,首字母大写的这种函数,如下:
function Person(){ // };
可叫做“构造函数”,在一个类中,比如:(php为例)
class Man extends Person { public function __construct() { // } }
__construct()也叫“构造函数”,这两种都叫“构造函数”,有什么区别?
__construct()
认证高级PHP讲师
语法而已,话说php也支持类名函数就是构造方法的,双下划线的是php5.3引入的,以前不支持
语法而已,话说php也支持类名函数就是构造方法的,双下划线的是php5.3引入的,以前不支持