為什么我寫(xiě)了一個(gè)構(gòu)造函數(shù),運(yùn)行的時(shí)候沒(méi)有直接調(diào)用
<?php class?Na{ public?$name='asd'; function?__d($name,$pass){ $name=123; $pass=123; echo?'chishi?<br/>'; } public?function?ceshi(){ echo?'dsa?<br/>'; } }$name=new?Na();$name->ceshi();$name->__d('123','456');echo?$name->name;?>
2019-04-16
構(gòu)造函數(shù)的函數(shù)名稱為?__construct ,是系統(tǒng)函數(shù)