Re: T_CONCAT_EQUAL operator and object's write/read handlers

From: Date: Fri, 30 May 2008 20:29:34 +0000
Subject: Re: T_CONCAT_EQUAL operator and object's write/read handlers
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5477@lists.php.net to get a copy of this message
hi, On Fri, May 30, 2008 at 9:49 PM, Piotr Pokora <piotrek.pokora@gmail.com> wrote: > > Hi! > > Why write_property handler is not invoked when concatenation operator is > used in such case? > > $obj->prop .= 'a more text here'; > > It works fine in such example: > > $obj->prop = $obj->prop . 'a more text here'; > > 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. Cheers -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.pecl.dev (#5477) next »