I'm opening up several new threads to get discussion going on the remaining "being debated" categories referenced in this 1.1 -> 1.2 change spec:
https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests

Shadowing

v1.1 has properties shadow accessors, the suggestion is that this be inverted. Specifically this means that in v1.1, if an accessor is defined and no property is defined, then the accessor will be used. But when a property is assigned/declared then the property will “shadow” the accessor and the accessor will no longer be used until the property is unset().

v1.2 Proposes that this be inverted such that if there is an accessor defined for a given property name, the accessor will always be used. The accessor would be able to get/set/isset/unset the property with the same name as the accessor. No direct access to the property would be allowed except from within the accessor.

v1.2 proposal seems to make the most sense however it would incur a slight (possibly *very* slight) performance penalty.

Thoughts?

--
-Clint


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

Reply via email to