php initialization method: Use the constructor construct to implement, the code is [public function __construct($count,$money){$this->count = $count;$this->money = $money; }].
php initialization method:
Use the constructor construct to achieve
count = $count; $this->money = $money; } } $s1 = new Saler(100,100); $s2 = new Saler(1000,1000); $s1->__construct(1000,1000); var_dump($s1,$s2);
Think To learn more about programming learning, please pay attention to thephp trainingcolumn!
The above is the detailed content of What is the php initialization method?. For more information, please follow other related articles on the PHP Chinese website!