Added a remark about overloaded properties and language constructs (Bug #43936)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@304662 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2010-10-23 14:06:51 +00:00
parent 453bc9c8d7
commit 606c44a528

View file

@ -144,6 +144,20 @@
</para>
</note>
<note>
<para>
It is not possible to use overloaded properties in other
language constructs than <function>isset</function>. This
means if <function>empty</function> is called on an overloaded
property, the overloaded method is not called.
</para>
<para>
To workaround that limitation, the overloaded property must
be copied into a local variable in the scope and then be
handed to <function>empty</function>.
</para>
</note>
<example>
<title>
Overloading properties via the <function>__get</function>,