<?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;?>
构造函数的函数名称为 __construct ,是系统函数