Home  >  Article  >  Backend Development  >  幻术方法_set 为何直接ECHO 无效呢

幻术方法_set 为何直接ECHO 无效呢

WBOY
WBOYOriginal
2016-06-13 12:14:42928browse

魔术方法__set 为何直接ECHO 无效呢?

本帖最后由 baidu_25468825 于 2015-02-03 01:10:40 编辑
上面写着::
当对不可访问属性调用 isset() 或 empty() 时,__isset() 会被调用。  

在下面又写::
在除 isset() 外的其它语言结构中无法使用重载的属性,这意味着当对一个重载的属性使用 empty() 时,重载魔术方法将不会被调用。 为避开此限制,必须将重载属性赋值到本地变量再使用 empty()。 

自己测试empty有效.
求问手册上的这段话是什么意思>????????????????


------解决思路----------------------
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn