摘要:
1. __construct: 内置构造函数,在对象被创建时自动调用。见如下代码:arg1 = $arg1; $this->arg2 = $arg2; print "__construct is called...\n"; } public function printAttributes() { print '$arg1 = '.$this->arg1.' $arg2 = '.$this->arg2."\n"; }}$testObject = new ConstructTest("arg1&q 阅读全文