发布网友 发布时间:2022-04-06 02:13
共2个回答
热心网友 时间:2022-04-06 03:42
class myname{
var $user;
function myname($name){
$this->user=$name;
}
function say(){
echo "我的姓名是".$this->user;
}
function _destruct(){
echo "do _destruct";
}
}
class student extends myname{
var $school;
function study(){
echo "study hard";
}
}
$yy=new student("兰玉");
$yy->say();
热心网友 时间:2022-04-06 05:00
destruct前面是两条下划线__ 析构方面前面是__destruct追问兰玉的姓名打不出是怎么回事呢?