摘要: 1. __toString: 当对象被打印时,如果该类定义了该方法,则打印该方法的返回值,否则将按照PHP的缺省行为输出打印结果。该方法类似于Java中的toString()。privateField = "This is a private Field.\n"; $this->publicField = "This is a public Field.\n"; } public function __get($property) { print "__get() is called.\n"; $method = "g 阅读全文
posted @ 2014-01-02 08:53 OrangeAdmin 阅读(2996) 评论(1) 推荐(4) 编辑