Re: T_CONCAT_EQUAL operator and object's write/read handlers
| From: | Pierre Joye | Date: | Fri, 30 May 2008 20:47:06 +0000 |
| Subject: | Re: T_CONCAT_EQUAL operator and object's write/read handlers | ||
| References: | 1 2 3 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5479@lists.php.net to get a copy of this message | ||
hi Piotr,
On Fri, May 30, 2008 at 10:40 PM, Piotr Pokora <piotrek.pokora@gmail.com> wrote:
> Pierre Joye writes:
>> hi,
>
> Hi! Thanks for such quick reply!
>
>>> In first example only read handler is invoked ,whilst read and write
>>> ones in latter.
>>> I doubt it's write handler issue. Should I have another handler like
>>> get_property_ptr_ptr_t?
>>
>> (.+-*/)=, ++, -- can't be detected from an extension point of view. I
>> tried to convince internals a couple of years ago that it is amazingly
>> handy to have such features available but it was affiliated to a
>> complete operator overloading and was rejected. I'm not sure there is
>> any chance to get it in now but who knows.
>
> So in theory ( if I have own read/write handlers ), I should duplicate
> every property and ( at best ) register all of them as zend's class
> properties? '.=' works fine for built-in handlers, but I would like to
> know what should be sacrified ( and done ) to work around this issue.
++ for example will do a property read followed by a property write.
.= should work too, you only don't know that a .= is being executed
(unlike a->f=1).
--
Pierre
http://blog.thepimp.net | http://www.libgd.org