";
///////////////////////////////////////////
echo "// 簡易物件變數宣告
";
echo "member:用var取代public
";
echo "function:不需要寫public
";
/////////////////////////////////////////////////////////////
echo "
";
//////標準寫法/////////////////////////////////////////////
class webpage{
var $title;
var $bgcolor;
var $txtcolor;
var $h1txt;
function __construct($a1="標題",$a2="white",$a3="black",$a4="測試"){
$this->title = $a1;
$this->bgcolor = $a2;
$this->txtcolor = $a3;
$this->h1txt = $a4;
}
function __destruct(){
$this->title = NULL;
$this->bgcolor = NULL;
$this->txtcolor = NULL;
$this->h1txt = NULL;
}
function show(){
$str = "