class TestClass{
function TestClass(){
$this->addAttr = "testtest";
}
function testAddAttr(){
echo $this->addAttr
}
}
说明:addAttr我们动态给类对象的一个变量,该变量只能在类内部使用,
class TestClass{
function TestClass(){
$this->addAttr = "testtest";
}
function testAddAttr(){
echo $this->addAttr
}
}
说明:addAttr我们动态给类对象的一个变量,该变量只能在类内部使用,