From 606c44a528e1649ff4dcb5706a5e85935d9c36f6 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Sat, 23 Oct 2010 14:06:51 +0000 Subject: [PATCH] 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 --- language/oop5/overloading.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/language/oop5/overloading.xml b/language/oop5/overloading.xml index c251404f25..0bc098ce41 100644 --- a/language/oop5/overloading.xml +++ b/language/oop5/overloading.xml @@ -144,6 +144,20 @@ + + + It is not possible to use overloaded properties in other + language constructs than isset. This + means if empty is called on an overloaded + property, the overloaded method is not called. + + + To workaround that limitation, the overloaded property must + be copied into a local variable in the scope and then be + handed to empty. + + + Overloading properties via the <function>__get</function>,