Edit report at https://bugs.php.net/bug.php?id=55731&edit=1
ID: 55731 User updated by: 421034509 at qq dot com Reported by: 421034509 at qq dot com Summary: __get after __unset Status: Bogus Type: Bug Package: Unknown/Other Function Operating System: windows xp PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: Thank you!I got it! Previous Comments: ------------------------------------------------------------------------ [2011-09-22 01:28:25] larue...@php.net No, if the property is private, and the getter is called out of call entry(means access a private property out of scope), zend vm will return NULL, but zend_read_property will assume as a "public property name", since PHP is a flexible language. ------------------------------------------------------------------------ [2011-09-22 01:18:53] 421034509 at qq dot com When get_property_info successed in the Example class, if the private property is defined but be unsetted,zend vm return a property info with name "\0Example\0propertyname", but if the property is undefined(or defined but not be unsetted),zend vm return a property info with name "propertyname". Is that true? ------------------------------------------------------------------------ [2011-09-22 01:17:55] larue...@php.net because there is no '\0Example\0p3' in property_info of Example class entry ------------------------------------------------------------------------ [2011-09-21 16:51:52] hytest at gmail dot com If we add following code: echo $example->p3; It still just call __get once. Why it doesn't call it twice? ( one for "p3" and one for "\0example\0p3" ? ) In another word: what's the different between a property not defined and a unset private property? ------------------------------------------------------------------------ [2011-09-21 09:02:15] 421034509 at qq dot com Thank you very much!You are so kind and patient! I see your blog! It's great! æ¨ä¹æ¯ä¸å½äººåï¼ æç°å¨å¤§åï¼ç°å¨å¨å京å¦ä¹ ï¼åæ¥è§¦php!å¸æ以åè¿è½è¯·ææ¨ï¼ ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55731 -- Edit this bug report at https://bugs.php.net/bug.php?id=55731&edit=1