$newclass = new myclass();
$newclass->show();

class myclass{
private $test=1;
function __construct(){
$this->test = $this->test +2;
}
function myclass(){
$this->test = $this->test +1;
}


function show(){
echo $this->test;
}

}

posted on 2012-09-26 16:01  老迁  阅读(100)  评论(0编辑  收藏  举报