05 May 2010
PHP面向对象常规示例
制作一个普通对象
name;
echo $this->age;
echo $this->sex;
}
}
$nishuo = new CatAction;
$nishuo->name='lisi';
$nishuo->age='20';
$nishuo->sex='nv';
$nishuo->say();
构造函数
name = $name;
$this->sex = $sex;
$this->age = $age;
}
function say(){
echo $this->name;
echo $this->sex;
echo $this->age.'
';
}
function __destruct(){
echo '886'.$this->name;
}
}
$yonglei = new Person('lisi','nan','18');
$yonglei->say();
?>
这个插件比较扯淡,缩进居然都消失了