Hi!

> Sorry I guess I should have been more clear.  The recursion would 
> prevent the accessor from being called which would allow the ordinary 
> property code to execute, thus accessing the property directly.  I 

This could lead to weird scenarios where the same $foo->bar in random
function could call or not call an accessor depending on the stack trace
(provided that accessors call out to other functions - which is not
frequent but can definitely happen). In case of __get it's harmless
since we know $foo->bar doesn't exist anyway, but if we do allow $bar to
exist in $foo it might get weird. I'd certainly appreciate some
notice/E_STRICT if this happens.
Maybe I'd go even as far as issuing E_STRICT on having both $bar and any
of the accessors for $bar in the same class - but this of course would
scream on the scenario of augmenting existing $bar with accessors -
which is legit, unless it gets weird as described above.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to