> On 24 Oct 2014, at 06:09, Xinchen Hui <larue...@php.net> wrote:
> so you prefer to expose the name of the property anywhere? > > let's say you expose a readonly int value name iSize.. > > but later, the value also need to be a double, > > then you also prefer add another dval? (since you can not simple > change ival name, since it was exposed) Is that not already a problem with functions? You can't change their names. If you do change its name, you can add a __get. > I knew this of course, but this is actually not related to this > specific "readonly" RFC > > but if you are strict to this., then I'd like to say, this will > slowdown all FETCH_OBJ_R a bit, since this will need introduce a > condition to check whether a property is readonly.. only faster a > narrow case... Right, it will theoretically make public and protected property lookups ever-so-slightly slower. I'll need to benchmark it as I doubt it's a big deal in practice. Though this could be worked around by making the write check be a different function. Or by inlining. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php