日期:2014-05-16  浏览次数:20364 次

一个面向对象的基础编程
$this->$name;
$this->name;
$this->name;是调用当前对象的name属性,$this->$name;是干什么的?二者有什么区别?
------解决方案--------------------
$name = 'abc';
$this->$name;
调用当前对象的 abc 属性
------解决方案--------------------
$this->name是直接调用
$this->$name间接调用