class ClassName{
var $var1;
var $var2;
function myfunction1(){
$result = "$this->var1 and $this->var2";
return $result;
}
function myfunction2(){
$myfunction1 = $this->myfunction1();
return $myfunction1;
}
}
$myclass = &new ClassName;
$myclass->var1 = "A";
$myclass->var2 = "B";
echo $myclass->myfunction1()."
";
echo $myclass->myfunction2()."
";
?>